I tried to remove treesitter from nvim-cmp sources by making it null:
config.vim = {
treesitter = {
fold = true;
context.enable = true;
};
autocomplete.nvim-cmp = {
enable = true;
sourcePlugins = [
"cmp-nvim-lsp"
"cmp-path"
];
sources = {
treesitter = null;
};
};
};
And I got that error:
error: The option `vim.autocomplete.nvim-cmp.sources.treesitter` is defined both null and not null, in `/nix/store/fnbinzfzkwiw9kihfaig18x2raf3zxdz-source/modules/plugins/treesitter/config.nix' and `<unknown-file>'.
I assume the problem is here, where treesitter automatically add itself to nvim-cmp sources:
|
# cmp-treesitter doesn't work on blink.cmp |
|
autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable { |
|
sources = {treesitter = "[Treesitter]";}; |
|
sourcePlugins = ["cmp-treesitter"]; |
|
}; |
I tried to remove treesitter from nvim-cmp sources by making it null:
And I got that error:
I assume the problem is here, where treesitter automatically add itself to nvim-cmp sources:
nvf/modules/plugins/treesitter/config.nix
Lines 16 to 20 in d07d8f6
that should fix it, as nix by default merges lists, instead of overwriting them.
lib.mkForcetells it to force overwrite everything in the list