{ programs.nixvim = { opts.completeopt = [ "menu" "menuone" "noselect" ]; plugins = { lspkind = { enable = true; settings.mode = "symbol"; }; cmp = { enable = true; autoEnableSources = true; settings = { snippet.expand = "function(args) vim.snippet.expand(args.body) end"; formatting.fields = [ "abbr" "kind" "menu" ]; mapping = { "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.select_next_item()"; "" = "cmp.mapping.scroll_docs(-4)"; "" = "cmp.mapping.scroll_docs(4)"; "" = "cmp.mapping.close()"; "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping.complete()"; "" = '' cmp.mapping( function() if vim.snippet.active({ direction = 1 }) then vim.snippet.jump(1) end end, {'i', 's'} ) ''; "" = '' cmp.mapping( function() if vim.snippet.active({ direction = -1 }) then vim.snippet.jump(-1) end end, {'i', 's'} ) ''; }; sources = [ { name = "nvim_lsp"; } { name = "nvim_lsp_signature_help"; } { name = "path"; } ]; }; }; }; }; }