neoclide / coc.nvim

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

Change timeout value of CocTagFunc #5049

Closed jrmd54 closed 2 weeks ago

jrmd54 commented 2 weeks ago

Is your feature request related to a problem? Please describe. I work on multiple c++ projects and uses vim with coc and clangd. I have the following line in my .vimrc: set tagfunc=CocTagFunc

However there is one project in which the following issue happens:

vim.log

The output of CocInfo is:

CocInfo.log

Describe the solution you'd like Being able to change the timeout of getTagList function. While it does not solve the root of the problem, it should prevent vim to freeze. On regular projects <c-]> never takes more than 1sec so being able to do that would already be a great improvement.

Describe alternatives you've considered Is there any additional info i can provide to help pinpoint the root of the issue?

Thank you very much for your insight.

fannheyward commented 2 weeks ago

What's your coc.preferences.tagDefinitionTimeout setting? By default it's 0, won't timeout the function.

Check :h coc-preferences-tagDefinitionTimeout.

jrmd54 commented 2 weeks ago

You are right, adding "coc.preferences.tagDefinitionTimeout": 1000 to coc-settings.json solves the issue, thank you!