Add Neovim cmp autocompletion

Finally a fast none disturbing auto completion.
lsp_signature_nvim is kept as it provides info while filling in
arguments.
cmp lsp didn't work in my case, so didn't add it.
This commit is contained in:
Daniel Siepmann 2022-03-22 13:29:49 +01:00
parent a652394ba4
commit cb7d380e0b
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 25 additions and 1 deletions

View file

@ -185,7 +185,6 @@ in {
# - https://github.com/glacambre/firenvim Give it another try, integrates neovim into firefox
# - https://github.com/lambdalisue/vim-pager/ (try once I use neovim as pager again)
# - https://github.com/hrsh7th/nvim-cmp (due to actual help of each parameter while adding values to function call)
# - https://github.com/weilbith/nvim-code-action-menu/ Check again in future, right now not of much useness on my setup.
#
@ -309,6 +308,15 @@ in {
'';
}
{
plugin = nvim-cmp;
type = "lua";
config = pkgs.lib.fileContents ./neovim/plugins/cmp.lua;
}
cmp-omni
cmp-buffer
cmp-nvim-lua
{
plugin = lsp_signature-nvim;
type = "lua";

View file

@ -0,0 +1,16 @@
require('cmp').setup({
view = {
entries = 'native',
},
experimental = {
ghost_text = true,
},
sources = require('cmp').config.sources({
{ name = 'omni' },
{ name = 'nvim_lua' },
}, {
{ name = 'buffer' },
}),
})