Closed diabloneo closed 2 years ago
Hi, @chemzqm
I checked the four reasons in the document:
b:coc_enabled
is set to 0
. (It's undefined)coc.preferences.maxFileSize
configuration. (Not exceed)So, I still can't figure the reason. Any more guides?
B.T.W, I used release branch when I reported this issue, and later I tried with master branch, still got same issue.
Could be autocmds
not fired for document, try minimal vimrc or use set updatetime=300
and make sure CursorHold
event fired.
Try upgrade coc.nvim, might be fixed.
Hi just wanted to +1 this issue and that after updating after this comment it seems to be better for me (haven't run into it again yet).
@chemzqm Them problem seems solved after I upgraded coc.nvim. I tested with NVIM v0.6.1.
I got the same problem, after I updgrade coc.nvim, the problem still exists. Here is my log from CocInfo:
## versions
vim version: NVIM v0.6.1
node version: v14.18.3
coc.nvim version: 0.0.80-0042eb35 2022-04-19 23:44:42 +0800
coc.nvim directory: /home/haiming/.config/nvim/plugged/coc.nvim
term: tmux
platform: linux
## Log of coc.nvim
2022-04-20T14:25:20.297 INFO (pid:22158) [services] - registered service "languageserver.golang"
2022-04-20T14:25:20.327 INFO (pid:22158) [coc-git] - Looking for git in: git
2022-04-20T14:25:20.398 INFO (pid:22158) [plugin] - coc.nvim initialized with node: v14.18.3 after 204ms
2022-04-20T14:25:20.894 INFO (pid:22158) [attach] - receive notification: highlight []
2022-04-20T14:25:24.568 INFO (pid:22158) [attach] - receive notification: highlight []
2022-04-20T14:25:25.265 INFO (pid:22158) [attach] - Request action: jumpDefinition []
2022-04-20T14:25:25.267 ERROR (pid:22158) [attach] - Request error: jumpDefinition [] Error: Document of 1 not attached, checkout :h CocAction('ensureDocument')
at g$.getAttachedDocument (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:200:2499)
at $x.getCurrentState (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:22556)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async _x.request (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:276:2680)
at async _x.gotoDefinition (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:276:4147)
at async Xx.cocAction (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:34336)
at async nA.<anonymous> (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:36304)
I got the same problem, after I updgrade coc.nvim, the problem still exists. Here is my log from CocInfo:
## versions vim version: NVIM v0.6.1 node version: v14.18.3 coc.nvim version: 0.0.80-0042eb35 2022-04-19 23:44:42 +0800 coc.nvim directory: /home/haiming/.config/nvim/plugged/coc.nvim term: tmux platform: linux ## Log of coc.nvim 2022-04-20T14:25:20.297 INFO (pid:22158) [services] - registered service "languageserver.golang" 2022-04-20T14:25:20.327 INFO (pid:22158) [coc-git] - Looking for git in: git 2022-04-20T14:25:20.398 INFO (pid:22158) [plugin] - coc.nvim initialized with node: v14.18.3 after 204ms 2022-04-20T14:25:20.894 INFO (pid:22158) [attach] - receive notification: highlight [] 2022-04-20T14:25:24.568 INFO (pid:22158) [attach] - receive notification: highlight [] 2022-04-20T14:25:25.265 INFO (pid:22158) [attach] - Request action: jumpDefinition [] 2022-04-20T14:25:25.267 ERROR (pid:22158) [attach] - Request error: jumpDefinition [] Error: Document of 1 not attached, checkout :h CocAction('ensureDocument') at g$.getAttachedDocument (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:200:2499) at $x.getCurrentState (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:22556) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async _x.request (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:276:2680) at async _x.gotoDefinition (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:276:4147) at async Xx.cocAction (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:34336) at async nA.<anonymous> (/home/haiming/.config/nvim/plugged/coc.nvim/build/index.js:288:36304)
Problem solved, I used to set config 'coc.preferences.maxFileSize' to 25M, but I make a mistake of setting '25MB' to '25M', maybe that's the reason. After change 'M' to 'MB', the problem seems solved.
Use command :CocCommand document.checkBuffer
to check buffer state.
Result from CocInfo
Env:
Describe the bug
I work on a Golang project which use gopls as language server. The error happens sometimes when I try to jump to some definitions.
The way I used neovim and coc is:
nvim .