-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to disable nvim-cmp or disable all cmp-sources for certain files? #1522
Comments
BTW I did encounter the |
It can be managed from the source side by defining the Lines 748 to 752 in e28fb7a
In other words, this issue should be put up in cmp-treesitter, not here. |
You can fully control nvim-cmp configuration based on autocmd as below. vim.api.nvim_create_autocmd('FileType', {
callback = function()
require('cmp').setup.buffer {
...
}
end,
}) |
Thanks for the idea @hrsh7th :) For the sake of others I added a wiki subsection at: |
This seems to work for me too, for completely disabling nvim-cmp for a certain filetype: require("cmp").setup.filetype("txt", {
enabled = false,
}) |
I have a long bash script with an enormous amount of variables that I think make my
nvim-cmp
stuck when I try to edit it. How do I disable it? I'm looking for something like treesitter's feature:https://github.com/nvim-treesitter/nvim-treesitter/blob/master/README.md?plain=1#L132-L139
The text was updated successfully, but these errors were encountered: