{config, ...}: { # programs.nixvim.plugins.cmp-vsnip.enable = true; # programs.nixvim.plugins.cmp_luasnip.enable = true; programs.nixvim.plugins.cmp-nvim-lsp-signature-help.enable = true; programs.nixvim.plugins.cmp-latex-symbols.enable = true; programs.nixvim.plugins.cmp-nvim-lsp.enable = true; programs.nixvim.plugins.cmp = { enable = true; autoEnableSources = true; settings = { sources = [ {name = "nvim_lsp";} {name = "path";} # { name = "buffer"; } {name = "nvim_lsp_signature_help";} {name = "latex_symbols";} {name = "vsnip";} ] ++ ( if config.programs.nixvim.plugins.orgmode.enable then [{name = "orgmode";}] else [] ) ++ ( if config.programs.nixvim.plugins.neorg.enable then [{name = "neorg";}] else [] ); mapping = { "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping.confirm({ select = true })"; "" = '' function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end ''; "" = '' function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end ''; "" = "cmp.mapping.complete()"; }; # snippet.expand = '' # function(args) # require("luasnip").lsp_expand(args.body) # end # ''; }; }; }