nvim: add cmp-dictionary and dict for git
This commit is contained in:
parent
529c07ff7e
commit
30416dbd26
|
@ -12,7 +12,8 @@ packer.use {
|
||||||
requires = 'https://github.com/L3MON4D3/LuaSnip'
|
requires = 'https://github.com/L3MON4D3/LuaSnip'
|
||||||
},
|
},
|
||||||
'https://github.com/hrsh7th/cmp-nvim-lua',
|
'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()
|
config = function()
|
||||||
local cmp = require'cmp'
|
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 `/`
|
-- Use buffer source for `/`
|
||||||
cmp.setup.cmdline('/', {
|
cmp.setup.cmdline('/', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
@ -96,5 +105,12 @@ packer.use {
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('cmp_dictionary').setup({
|
||||||
|
dic = {
|
||||||
|
['gitcommit'] =
|
||||||
|
vim.fn.stdpath('config') .. '/resources/git.dict',
|
||||||
|
}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
8
.config/nvim/resources/git.dict
Normal file
8
.config/nvim/resources/git.dict
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Closes:
|
||||||
|
Bug:
|
||||||
|
Fixes:
|
||||||
|
Acked-by:
|
||||||
|
Reported-by:
|
||||||
|
Reviewed-by:
|
||||||
|
Suggested-by:
|
||||||
|
Tested-by:
|
Loading…
Reference in New Issue
Block a user