diff --git a/.config/nvim/lua/my/completion.lua b/.config/nvim/lua/my/completion.lua index 483311f..a25c2ac 100644 --- a/.config/nvim/lua/my/completion.lua +++ b/.config/nvim/lua/my/completion.lua @@ -12,7 +12,8 @@ packer.use { requires = 'https://github.com/L3MON4D3/LuaSnip' }, 'https://github.com/hrsh7th/cmp-nvim-lua', - 'https://github.com/hrsh7th/cmp-nvim-lsp-signature-help' + 'https://github.com/hrsh7th/cmp-nvim-lsp-signature-help', + 'https://github.com/uga-rosa/cmp-dictionary', }, config = function() local cmp = require'cmp' @@ -79,6 +80,14 @@ packer.use { }) }) + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'dictionary' } + }, { + { name = 'buffer' } + }) + }) + -- Use buffer source for `/` cmp.setup.cmdline('/', { mapping = cmp.mapping.preset.cmdline(), @@ -96,5 +105,12 @@ packer.use { { name = 'cmdline' } }) }) + + require('cmp_dictionary').setup({ + dic = { + ['gitcommit'] = + vim.fn.stdpath('config') .. '/resources/git.dict', + } + }) end } diff --git a/.config/nvim/resources/git.dict b/.config/nvim/resources/git.dict new file mode 100644 index 0000000..cb64b50 --- /dev/null +++ b/.config/nvim/resources/git.dict @@ -0,0 +1,8 @@ +Closes: +Bug: +Fixes: +Acked-by: +Reported-by: +Reviewed-by: +Suggested-by: +Tested-by: