{ programs.nixvim.plugins.cmp = { enable = true; autoEnableSources = true; settings = { sources = [ { name = "nvim_lsp"; } { name = "path"; } { name = "buffer"; } ]; mapping = { "" = '' cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, { "i", "s" }) ''; "" = '' cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end, { "i", "s" }) ''; "" = "cmp.mapping.complete()"; "" = "cmp.mapping.confirm({ select = true })"; }; }; }; }