From bcda6ca4f200d03cda193c3b20b3ece7158d5223 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 23 Apr 2025 22:40:04 +0200 Subject: nixvim: switch back to nvim-cmp for completion --- common/nixvim.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'common') diff --git a/common/nixvim.nix b/common/nixvim.nix index 367f442..72a80e2 100644 --- a/common/nixvim.nix +++ b/common/nixvim.nix @@ -307,6 +307,46 @@ inputs: ]; plugins = { + cmp = { + enable = true; + autoEnableSources = false; + settings = { + mapping.__raw = '' + cmp.mapping.preset.insert({ + [''] = cmp.mapping.confirm({ select = false }), + }) + ''; + + sources.__raw = '' + cmp.config.sources({ + { name = 'orgmode' }, + { name = 'git' }, + { name = 'nvim_lsp' }, + { name = 'async_path' }, + }, { + { name = 'buffer' }, + }, { + { name = 'spell' }, + }) + ''; + }; + }; + cmp-nvim-lsp.enable = true; + cmp-async-path.enable = true; + cmp-buffer.enable = true; + cmp-git = { + enable = true; + settings = { + filetypes = [ + "gitcommit" + "octo" + "NeogitCommitMessage" + "jjdescription" + ]; + }; + }; + cmp-spell.enable = true; + diffview.enable = true; dressing.enable = true; -- cgit v1.2.3