1
0
Fork 0

nvim: add cmp-dictionary and dict for git

This commit is contained in:
tastytea 2022-08-13 21:28:42 +02:00
parent 529c07ff7e
commit 30416dbd26
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 25 additions and 1 deletions

View File

@ -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
}

View File

@ -0,0 +1,8 @@
Closes:
Bug:
Fixes:
Acked-by:
Reported-by:
Reviewed-by:
Suggested-by:
Tested-by: