From 68b6a81de1bdc476f607ed095568a748aa8ce6dc Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 15 Jan 2022 14:56:44 +0530 Subject: move from completion-nvim to nvim-cmp --- programs/init.vim | 13 ++----------- programs/neovim.nix | 8 +++++++- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'programs') diff --git a/programs/init.vim b/programs/init.vim index 0393912..4a822da 100644 --- a/programs/init.vim +++ b/programs/init.vim @@ -47,12 +47,6 @@ augroup fzfstatus endif augroup END -augroup completions - " Use completion-nvim in every buffer - autocmd! - autocmd BufEnter * lua require'completion'.on_attach() -augroup END - " general settings set nobackup set nowritebackup @@ -96,7 +90,7 @@ set signcolumn=yes set inccommand=split set showmatch set diffopt+=vertical -set completeopt=menuone,noinsert,noselect +set completeopt=menu,menuone,noselect set exrc let g:netrw_browsex_viewer= "xdg-open" @@ -170,9 +164,6 @@ let g:tex_flavor = 'latex' let g:elm_setup_keybindings = 0 -let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all'] -let g:completion_trigger_on_delete = 1 - sign define LspDiagnosticsSignError text=× texthl=LspDiagnosticsSignError linehl= numhl= sign define LspDiagnosticsSignWarning text=\! texthl=LspDiagnosticsSignWarning linehl= numhl= sign define LspDiagnosticsSignInformation text=i texthl=LspDiagnosticsSignInformation linehl= numhl= @@ -183,5 +174,5 @@ let g:user_emmet_leader_key='' lua << EOF require 'lsp' require 'treesitter' +require 'completions' EOF - diff --git a/programs/neovim.nix b/programs/neovim.nix index e4878b3..fc3cc85 100644 --- a/programs/neovim.nix +++ b/programs/neovim.nix @@ -22,7 +22,13 @@ # neovim only nvim-lspconfig (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) - completion-nvim + nvim-cmp + + # completion sources + cmp-nvim-lsp + cmp-buffer + cmp-path + cmp-cmdline # tpope vim-surround -- cgit v1.2.3