{ programs.nixvim = { opts.completeopt = ["menu" "menuone" "noselect"]; plugins = { luasnip.enable = true; cmp-nvim-lsp.enable = true; cmp-nvim-lsp-signature-help.enable = true; lspkind = { enable = true; cmp = { enable = true; menu = { nvim_lsp = "[LSP]"; nvim_lua = "[api]"; path = "[path]"; luasnip = "[snip]"; buffer = "[buffer]"; }; }; extraOptions = { mode = "symbol"; }; }; cmp = { enable = true; autoEnableSources = true; settings = { snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; 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 luasnip.expand_or_locally_jumpable() then luasnip.expand_or_jump() end end, {'i', 's'})''; "" = ''cmp.mapping(function() if luasnip.locally_jumpable(-1) then luasnip.jump(-1) end end, {'i', 's'})''; }; sources = [ { name = "nvim_lsp"; } { name = "luasnip"; } { name = "path"; } ]; }; }; }; }; }