diff --git a/home/.config/nvim/lua/plugins/plugin_list.lua b/home/.config/nvim/lua/plugins/plugin_list.lua index 213f1e9..1eb3743 100644 --- a/home/.config/nvim/lua/plugins/plugin_list.lua +++ b/home/.config/nvim/lua/plugins/plugin_list.lua @@ -21,6 +21,10 @@ local plugin_list = { { "wakatime/vim-wakatime" }, -- Track time spent coding { "mhinz/vim-startify" }, -- Nice startup screen for vim when started withotu file/dir { "dbeniamine/cheat.sh-vim" }, -- Quick interaction with cheat.sh cheatsheets + { + "tveskag/nvim-blame-line", -- Show commit affecting cursor line + config = get_plugin_file("blame_line.lua") + }, { "vimwiki/vimwiki", -- Wiki pages for vim config = get_plugin_file("vimwiki.lua"), diff --git a/home/.config/nvim/lua/plugins/settings/blame_line.lua b/home/.config/nvim/lua/plugins/settings/blame_line.lua new file mode 100644 index 0000000..8165577 --- /dev/null +++ b/home/.config/nvim/lua/plugins/settings/blame_line.lua @@ -0,0 +1,14 @@ +local vim = require("vim") +local m = require("utility.mappings") + +m.keymap("n", "", ":ToggleBlameLine") + +-- Enable blame line automatically +--vim.cmd[[autocmd BufEnter * EnableBlameLine]] + +-- Specify the highlight group used for the virtual text ('Comment' by default) +vim.g.blameLineVirtualTextHighlight = 'Question' + +-- Don't show a blame line when it isn't yet commited +-- there's no reason to show "Not yet commited" since we have git gutter +vim.g.blameLineMessageWhenNotYetCommited = ''