neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.46k stars 954 forks source link

[Want help] Disable suggestions in particular context. #3859

Closed PhyX-Meow closed 2 years ago

PhyX-Meow commented 2 years ago

Hello, because of a bug of ultisnips, their snippet run into random behavior when triggered when popup menu is visible. But unfortunately the bug has little hope to be resolved. So I'm seeking a way to prevent popup menu to appear in particular context. I have a function, namely vimtex#syntax#in_mathzone() provided by vimtex to detect whether the cursor position is in the math context. What I want to is do not show suggest when the function return true, just like if coc_suggest_disable is set to true. If no direct way to do this, some hacking on source code is also good for me. Thanks for any help!

chemzqm commented 2 years ago

Hack the code or use https://github.com/neoclide/coc-snippet instead.