{ programs.nixvim.plugins = { cmp-async-path.enable = true; cmp = { enable = true; settings = { autoEnableSources = true; experimental = {ghost_text = true;}; performance = { debounce = 60; fetchingTimeout = 200; maxViewEntries = 30; }; snippet = {expand = "luasnip";}; formatting = {fields = ["kind" "abbr" "menu"];}; sources = [ {name = "nvim_lsp";} {name = "emoji";} { name = "buffer"; # text within current buffer option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; keywordLength = 3; } # { name = "copilot"; } # enable/disable copilot { name = "path"; # file system paths keywordLength = 3; } { name = "luasnip"; # snippets keywordLength = 3; } ]; window = { completion = {border = "solid";}; documentation = {border = "solid";}; }; mapping = { "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; "" = "cmp.mapping.select_next_item()"; "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.abort()"; "" = "cmp.mapping.scroll_docs(-4)"; "" = "cmp.mapping.scroll_docs(4)"; "" = "cmp.mapping.complete()"; "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; }; }; }; cmp-nvim-lsp = { enable = true; # LSP }; cmp-buffer = { enable = true; }; cmp-path = { enable = true; # file system paths }; cmp-cmdline = { enable = true; # autocomplete for cmdline }; }; }