Show 'git blame' in lualine

This commit is contained in:
Emil Miler 2023-01-18 15:11:36 +01:00
parent e9a3abf8d9
commit f1e6f08360

View File

@ -14,14 +14,15 @@ return require('packer').startup(function()
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function()
require('lualine').setup()
vim.o.showmode = false
end
local git_blame = require('gitblame')
require('lualine').setup({
sections = {
lualine_c = {
{ git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }
}
use {
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup()
}
})
vim.o.showmode = false
end
}
use {
@ -31,6 +32,22 @@ return require('packer').startup(function()
end
}
-- Git
use {
'f-person/git-blame.nvim',
config = function()
vim.g.gitblame_date_format = '%r'
vim.g.gitblame_message_when_not_committed = ''
vim.g.gitblame_display_virtual_text = 0
end
}
use {
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup()
end
}
-- completion
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-buffer'