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,16 +14,17 @@ return require('packer').startup(function()
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }, requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function() config = function()
require('lualine').setup() local git_blame = require('gitblame')
require('lualine').setup({
sections = {
lualine_c = {
{ git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }
}
}
})
vim.o.showmode = false vim.o.showmode = false
end end
} }
use {
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup()
end
}
use { use {
'junegunn/goyo.vim', 'junegunn/goyo.vim',
config = function() config = function()
@ -31,6 +32,22 @@ return require('packer').startup(function()
end 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 -- completion
use 'hrsh7th/nvim-cmp' use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-buffer' use 'hrsh7th/cmp-buffer'