You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
First time call CocAction('diagnosticToggle')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:40:09.608 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:10.689 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:11.892 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:22.225 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:04.460 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.205 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.629 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:09.288 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:41:09.322 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:13.988 INFO (pid:315) [attach] - receive notification: showInfo []
Second time call CocAction('diagnosticToggle')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:40:09.608 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:10.689 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:11.892 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:22.225 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:04.460 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.205 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.629 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:09.288 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:41:09.322 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:13.988 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:41:14.072 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:17.473 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:37.723 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:37.821 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:52.294 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:53.235 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:59.055 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:08.263 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:09.510 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:09.753 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:26.331 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:29.658 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:30.045 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:42:30.159 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:34.020 INFO (pid:315) [attach] - receive notification: showInfo []
First time call CocAction('diagnosticToggleBuffer')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:51:37.999 INFO (pid:5152) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:51:38.003 INFO (pid:5152) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:51:38.016 INFO (pid:5152) [language-client-index] - Language server "languageserver.clangd" started with 5170
2024-12-23T10:51:38.040 INFO (pid:5152) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:51:38.046 INFO (pid:5152) [services] - service languageserver.clangd started
2024-12-23T10:51:38.525 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:38.711 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:38.891 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:39.308 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:40.061 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:48.182 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:52.012 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:52.288 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:53.922 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:55.617 INFO (pid:5152) [attach] - Request action: diagnosticToggleBuffer []
2024-12-23T10:51:55.668 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.022 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.238 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.430 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:52:00.178 INFO (pid:5152) [attach] - receive notification: showInfo []
Describe the bug
After entering gvim, I need to call CocAction('diagnosticToggle') twice the first time to enable coc-diagnostic if it is disabled in coc-settings.json. But if i call CocAction('diagnosticToggleBuffer'), it only need to be called once.
Reproduce the bug
1, Disable coc-diagnostic in coc-settings.json
2, Lazy load coc.nvim.
3, Open a cpp file.
4, Wait a moment, call CocAction('diagnosticToggle')
5, call CocAction('diagnosticToggle')
Create file mini.vim with:
" 去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限setnocompatible" 开启256色支持sett_Co=256" 不少插件的信息更新都会需要这个时间setupdatetime=33" 打开文件时进行解码的猜测列表setfileencodings=utf-8,utf-16,utf-32,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,big5,latin1
" 把当前文件转换为当前系统编码进行处理,这里为utf-8setencoding=utf-8scriptencoding utf-8" 禁止生成临时文件setnobackupsetnowritebackupsetnoswapfilesetshortmess+=csetshowcmdsetfoldmethod=manualsetstatusline=[TYPE=%Y]\ [POS=%l,%v,%L]\ [%{toupper(&fileencoding)}=0x%B]%m%rsetstatusline+=%=\ [%{strftime(\"%d/%m/%y-%H:%M\")}]%<
" 当窗口多于一个时显示状态行(1),总是显示状态行(2)setlaststatus=2" 命令行(在状态行下)的高度,默认为1,这里是2setcmdheight=2" 显示行号setnumber" merge signcolumn and number column into onesetsigncolumn=numberletg:plug_url_format='https://githubfast.com/%s.git'callplug#begin('~/.vim/plugged')
" 补全插件, 动态检测语法插件, 可鼠标停留显示信息, Layz
Plug 'neoclide/coc.nvim', {'branch': 'release'}
callplug#end()
" After 333ms, call the coc.nvim, markdown-preview and so onletg:coc_start_at_startup=0function!CocTimerStart(timer)
exec'CocStart'callLazyPluginConfiguration()
if &filetype==?'vim'" Disable automatic word wrappingsettextwidth=0endif" call CocActionAsync('diagnosticToggle')endfunctioncalltimer_start(333,'CocTimerStart',{'repeat':1})
function!LazyPluginConfiguration()
" coc setting" Use tab for trigger completion with characters ahead and navigate." NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped" by other plugin before putting this into your config.inoremap<expr><TAB>\ coc#pum#visible() ? coc#pum#next(1):\ CheckBackspace() ? "\<Tab>" :\ coc#refresh()inoremap<expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"" Make <CR> to accept selected completion item or notify coc.nvim to format" <C-g>u breaks current undo, please make your own choice.inoremap<expr><CR>coc#pum#visible() ? coc#_select_confirm()\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"function!CheckBackspace() abortletcol=col('.') -1return!col||getline('.')[col-1] =~# '\s'endfunctionnmap<Space>c<Plug>(coc-declaration)nmap<Space>d<Plug>(coc-definition)nmap<Space>f<Plug>(coc-refactor)nmap<Space>i<Plug>(coc-implementation)nmap<Space>j<Plug>(coc-diagnostic-next-error)nmap<Space>k<Plug>(coc-diagnostic-prev-error)nmap<Space>n<Plug>(coc-rename)nmap<Space>r<Plug>(coc-references)nmap[a<Plug>(coc-codeaction)nmap[b<Plug>(coc-codeaction-line)nnoremap[c<CR>:call CocAction('jumpDeclaration', 'tabe')<CR>nnoremap[d<CR>:call CocAction('jumpDefinition', 'tabe')<CR>nnoremap[e:call CocAction('diagnosticToggleBuffer')<CR>nnoremap[i:call CocAction('jumpImplementation', 'tabe')<CR>nmap[j<Plug>(coc-diagnostic-next)nmap[k<Plug>(coc-diagnostic-prev)nmap[l<Plug>(coc-diagnostic-info)nmap[s<Plug>(coc-codeaction-selected)vmap[s<Plug>(coc-codeaction-selected)nnoremap[t:call CocActionAsync('diagnosticToggle')<CR>letg:coc_filetype_map= {'opencl': 'cpp'}
letg:coc_global_extensions= ['coc-word', 'coc-tag', 'coc-dictionary', 'coc-snippets',
\ 'coc-prettier', 'coc-yaml', 'coc-cmake', 'coc-clangd', 'coc-perl', 'coc-vimlsp',
\ 'coc-sh', 'coc-pyright', 'coc-webview', 'coc-markmap', 'coc-markdown-preview-enhanced',
\ 'coc-markdownlint', 'coc-json', 'coc-css', 'coc-tsserver']
nmap<F7><Plug>(coc-format)vmap<F7><Plug>(coc-format-selected)" Use K to show documentation in preview windowfunction!ShowDocumentation()
ifCocAction('hasProvider', 'hover')
callCocActionAsync('doHover')
elsecallfeedkeys('K', 'in')
endifendfunctionnnoremapK:call ShowDocumentation()<CR>" Highlight the symbol and its references when holding the cursoraugroupPlugin_Configuration | autocmdCursorHold*callCocActionAsync('highlight') | augroupENDhi sym_hilight guifg='White' guibg='Black'endfunction
Result from CocInfo
Start vim
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
First time call CocAction('diagnosticToggle')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:40:09.608 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:10.689 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:11.892 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:22.225 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:04.460 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.205 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.629 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:09.288 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:41:09.322 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:13.988 INFO (pid:315) [attach] - receive notification: showInfo []
Second time call CocAction('diagnosticToggle')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:39:55.779 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:39:56.118 INFO (pid:315) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:39:56.123 INFO (pid:315) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:39:56.137 INFO (pid:315) [language-client-index] - Language server "languageserver.clangd" started with 327
2024-12-23T10:39:56.162 INFO (pid:315) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:39:56.169 INFO (pid:315) [services] - service languageserver.clangd started
2024-12-23T10:40:09.518 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:40:09.608 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:10.689 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:11.892 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:40:22.225 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:04.460 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.205 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:07.629 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:09.288 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:41:09.322 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:13.988 INFO (pid:315) [attach] - receive notification: showInfo []
2024-12-23T10:41:14.072 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:17.473 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:37.723 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:37.821 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:52.294 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:53.235 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:41:59.055 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:08.263 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:09.510 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:09.753 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:26.331 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:29.658 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:30.045 INFO (pid:315) [attach] - receive notification: diagnosticToggle []
2024-12-23T10:42:30.159 INFO (pid:315) [attach] - receive notification: highlight []
2024-12-23T10:42:34.020 INFO (pid:315) [attach] - receive notification: showInfo []
First time call CocAction('diagnosticToggleBuffer')
versions
vim version: VIM - Vi IMproved 9.1 9010908
node version: v22.11.0
coc.nvim version: 0.0.82-aacbbcad 2024-11-23 13:34:02 +0800
coc.nvim directory: /home/banana/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
2024-12-23T10:51:37.999 INFO (pid:5152) [plugin] - coc.nvim initialized with node: v22.11.0 after 431
2024-12-23T10:51:38.003 INFO (pid:5152) [services] - LanguageClient clangd state change: stopped => starting
2024-12-23T10:51:38.016 INFO (pid:5152) [language-client-index] - Language server "languageserver.clangd" started with 5170
2024-12-23T10:51:38.040 INFO (pid:5152) [services] - LanguageClient clangd state change: starting => running
2024-12-23T10:51:38.046 INFO (pid:5152) [services] - service languageserver.clangd started
2024-12-23T10:51:38.525 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:38.711 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:38.891 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:39.308 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:40.061 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:48.182 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:52.012 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:52.288 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:53.922 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:55.617 INFO (pid:5152) [attach] - Request action: diagnosticToggleBuffer []
2024-12-23T10:51:55.668 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.022 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.238 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:51:57.430 INFO (pid:5152) [attach] - receive notification: highlight []
2024-12-23T10:52:00.178 INFO (pid:5152) [attach] - receive notification: showInfo []
Describe the bug
After entering gvim, I need to call CocAction('diagnosticToggle') twice the first time to enable coc-diagnostic if it is disabled in coc-settings.json. But if i call CocAction('diagnosticToggleBuffer'), it only need to be called once.
Reproduce the bug
1, Disable coc-diagnostic in coc-settings.json
2, Lazy load coc.nvim.
3, Open a cpp file.
4, Wait a moment, call CocAction('diagnosticToggle')
5, call CocAction('diagnosticToggle')
mini.vim
with:The text was updated successfully, but these errors were encountered: