[Info - 10:40:31 AM] TSServer log file :
/tmp/coc-nvim-tsc.log
[Info - 10:40:31 AM] Forking TSServer
PATH: /home/rom/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rom/.fzf/bin
[Info - 10:40:31 AM] Started TSServer
{
"path": "/mnt/d/w_home/pptr/node_modules/typescript/lib",
"_api": {
"versionString": "3.7.2",
"version": "3.7.2"
}
}
[Info - 10:40:31 AM] ESLint server running in node v12.13.0
[Info - 10:40:32 AM] ESLint library loaded from: /mnt/d/w_home/pptr/node_modules/eslint/lib/api.js
In the beginning everything works fine.
After some editing, coc.nvim stops deleting outdated diagnostic info and shows wrong diagnostics for text that has already been changed.
Writing a file (:w) don't solve the problem.
But after this command
:CocAction('diagnosticList')
and press ESC
outdated diagnostic info disappears and all fine again.
This is beginning of .vimrc
Please let me know if any other info is required.
```vim
autocmd!
"=== coc.nvim === begin
"
"=== from coc.nvim guide
"
"Important: some vim plugins could change keymappings. Use a command like :verbose imap
"https://github.com/neoclide/coc.nvim
" if hidden is not set, TextEdit might fail.
set hidden
" Some servers have issues with backup files, see #649
set nobackup
set nowritebackup
" Better display for messages
set cmdheight=2
" You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
"set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate.
" Use command ':verbose imap
inoremap
\ pumvisible() ? "\
\
\ coc#refresh()
inoremap
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use
inoremap
" Use <C-g>u means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap
" Or use complete_info if your vim support it, like:
" inoremap
" Use [g and ]g to navigate diagnostics
nmap
nmap
" Remap keys for gotos
nmap
nmap
nmap
nmap
" Use K to show documentation in preview window
nnoremap
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('
else
call CocAction('doHover')
endif
endfunction
" Highlight symbol under cursor on CursorHold
" autocmd CursorHold * silent call CocActionAsync('highlight')
autocmd CursorHold * silent call CocActionAsync('highlight')
" Remap for rename current word
nmap
" Remap for format selected region
xmap
nmap
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Remap for do codeAction of selected region, ex: <leader>aap for current paragraph
xmap
nmap
" Remap for do codeAction of current line
nmap
" Fix autofix problem of current line
nmap
" Create mappings for function text object, requires document symbols feature of languageserver.
xmap if
xmap af
omap if
omap af
" Use
nmap
xmap
" Use :Format to format current buffer
command! -nargs=0 Format :call CocAction('format')
" Use :Fold to fold current buffer
command! -nargs=? Fold :call CocAction('fold',
" use :OR for organize import of current buffer
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add status line support, for integration with other plugin, checkout :h coc-status
set statusline^=%{coc#status()}
"set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Using CocList
" Show all diagnostics
nnoremap
" Manage extensions
nnoremap
" Show commands
nnoremap
" Find symbol of current document
nnoremap
" Search workspace symbols
nnoremap
" Do default action for next item.
nnoremap
" Do default action for previous item.
nnoremap
" Resume latest coc list
nnoremap
"=== coc.nvim === end
```
Need verbose log from tsserver https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
Thanks for support.
I upgraded eslint 5 to 6, and reinstalled all node_modules.
Seems to be working well now.
@chemzqm
Unfortunately, this appears again with another project.
Verbose log:
Info 0 [21:14:38.594] Starting TS Server
Info 1 [21:14:38.595] Version: 3.7.3
Info 2 [21:14:38.595] Arguments: /usr/bin/node /mnt/d/w_home/pptr/node_modules/typescript/lib/tsserver.js --allowLocalPluginLoads --useInferredProjectPerProjectRoot --cancellationPipeName /tmp/coc-nvim-tscancellation-97c0f4d901400d991677.sock* --logVerbosity normal --logFile /tmp/coc-nvim-tsc.log --npmLocation "/usr/bin/npm" --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
Info 3 [21:14:38.595] Platform: linux NodeVersion: 12 CaseSensitive: true
Info 4 [21:14:38.610] Search path: /mnt/d/w_home/pptr/src/opds
Info 5 [21:14:38.612] For info: /mnt/d/w_home/pptr/src/opds/obroker.ts :: Config file name: /mnt/d/w_home/pptr/tsconfig.json
Info 6 [21:14:38.613] Opened configuration file /mnt/d/w_home/pptr/tsconfig.json
Info 7 [21:14:38.659] Config: /mnt/d/w_home/pptr/tsconfig.json : {
"rootNames": [
"/mnt/d/w_home/pptr/src/coctest.ts",
"/mnt/d/w_home/pptr/src/pptr.ts",
"/mnt/d/w_home/pptr/src/opds/obroker.ts",
"/mnt/d/w_home/pptr/src/opds/obroker_191217.ts",
"/mnt/d/w_home/pptr/src/opds/opds.ts",
"/mnt/d/w_home/pptr/src/tnd/dtp.ts",
"/mnt/d/w_home/pptr/src/tnd/file.ts",
"/mnt/d/w_home/pptr/src/tnd/tnd.ts"
],
"options": {
"allowJs": false,
"checkJs": false,
"target": 2,
"module": 1,
"rootDir": "/mnt/d/w_home/pptr/src",
"outDir": "/mnt/d/w_home/pptr/out",
"sourceMap": true,
"moduleResolution": 2,
"allowSyntheticDefaultImports": true,
"configFilePath": "/mnt/d/w_home/pptr/tsconfig.json"
}
}
Info 8 [21:14:45.924] Local plugin loading enabled; adding /mnt/d/w_home/pptr to search paths
Info 9 [21:14:46.23] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 10 [21:14:51.509] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 1 structureChanged: true Elapsed: 5486ms
Info 11 [21:14:51.510] Project '/mnt/d/w_home/pptr/tsconfig.json' (Configured)
Info 12 [21:14:51.510] Files (97)
Info 13 [21:14:51.510] -----------------------------------------------
Info 14 [21:14:51.524] Project '/mnt/d/w_home/pptr/tsconfig.json' (Configured) 0
Info 14 [21:14:51.524] Files (97)
Info 14 [21:14:51.524] -----------------------------------------------
Info 14 [21:14:51.524] Open files:
Info 14 [21:14:51.524] FileName: /mnt/d/w_home/pptr/src/opds/obroker.ts ProjectRootPath: /mnt/d/w_home/pptr
Info 14 [21:14:51.525] Host configuration update for file /mnt/d/w_home/pptr/src/opds/obroker.ts
Info 15 [21:14:51.526] Structure before ensureProjectForOpenFiles:
Info 16 [21:14:51.527] Project '/mnt/d/w_home/pptr/tsconfig.json' (Configured) 0
Info 16 [21:14:51.527] Files (97)
Info 16 [21:14:51.527] -----------------------------------------------
Info 16 [21:14:51.527] Open files:
Info 16 [21:14:51.527] FileName: /mnt/d/w_home/pptr/src/opds/obroker.ts ProjectRootPath: /mnt/d/w_home/pptr
Info 16 [21:14:51.527] Structure after ensureProjectForOpenFiles:
Info 17 [21:14:51.527] Project '/mnt/d/w_home/pptr/tsconfig.json' (Configured) 0
Info 17 [21:14:51.527] Files (97)
Info 17 [21:14:51.527] -----------------------------------------------
Info 17 [21:14:51.527] Open files:
Info 17 [21:14:51.527] FileName: /mnt/d/w_home/pptr/src/opds/obroker.ts ProjectRootPath: /mnt/d/w_home/pptr
Info 17 [21:14:51.527] got projects updated in background, updating diagnostics for /mnt/d/w_home/pptr/src/opds/obroker.ts
Info 18 [21:14:51.530] Host configuration update for file /mnt/d/w_home/pptr/src/opds/obroker.ts
Info 19 [21:16:9.135] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 20 [21:16:9.165] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 2 structureChanged: false Elapsed: 30ms
Info 21 [21:16:9.165] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 22 [21:16:9.634] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 23 [21:16:9.654] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 3 structureChanged: false Elapsed: 20ms
Info 24 [21:16:9.654] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 25 [21:16:10.860] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 26 [21:16:10.906] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 4 structureChanged: false Elapsed: 46ms
Info 27 [21:16:10.906] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 28 [21:16:11.290] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 29 [21:16:11.334] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 5 structureChanged: false Elapsed: 44ms
Info 30 [21:16:11.334] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 31 [21:16:12.829] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 32 [21:16:12.862] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 6 structureChanged: false Elapsed: 33ms
Info 33 [21:16:12.863] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 34 [21:16:13.985] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 35 [21:16:14.29] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 7 structureChanged: false Elapsed: 44ms
Info 36 [21:16:14.30] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 37 [21:16:14.665] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 38 [21:16:14.687] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 8 structureChanged: false Elapsed: 22ms
Info 39 [21:16:14.687] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 40 [21:16:18.945] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 41 [21:16:18.999] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 9 structureChanged: false Elapsed: 54ms
Info 42 [21:16:18.999] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 43 [21:16:26.877] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 44 [21:16:26.890] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 10 structureChanged: false Elapsed: 13ms
Info 45 [21:16:26.890] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 46 [21:16:27.457] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 47 [21:16:27.499] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 11 structureChanged: false Elapsed: 42ms
Info 48 [21:16:27.499] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 49 [21:16:29.930] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 50 [21:16:29.975] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 12 structureChanged: false Elapsed: 44ms
Info 51 [21:16:29.975] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 52 [21:16:30.970] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 53 [21:16:31.8] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 13 structureChanged: false Elapsed: 38ms
Info 54 [21:16:31.8] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 55 [21:16:32.138] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 56 [21:16:32.158] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 14 structureChanged: false Elapsed: 20ms
Info 57 [21:16:32.158] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 58 [21:16:33.217] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 59 [21:16:33.245] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 15 structureChanged: false Elapsed: 28ms
Info 60 [21:16:33.245] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 61 [21:16:36.215] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 62 [21:16:36.245] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 16 structureChanged: false Elapsed: 30ms
Info 63 [21:16:36.245] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 64 [21:16:36.541] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 65 [21:16:36.563] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 17 structureChanged: false Elapsed: 22ms
Info 66 [21:16:36.563] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 67 [21:16:37.231] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 68 [21:16:37.300] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 18 structureChanged: false Elapsed: 69ms
Info 69 [21:16:37.300] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 70 [21:16:37.961] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 71 [21:16:37.997] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 19 structureChanged: false Elapsed: 36ms
Info 72 [21:16:37.998] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 73 [21:16:39.381] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 74 [21:16:39.428] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 20 structureChanged: false Elapsed: 46ms
Info 75 [21:16:39.428] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 76 [21:16:46.623] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 77 [21:16:46.645] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 21 structureChanged: false Elapsed: 21ms
Info 78 [21:16:46.645] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 79 [21:16:48.367] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 80 [21:16:48.397] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 22 structureChanged: false Elapsed: 30ms
Info 81 [21:16:48.397] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 82 [21:16:54.675] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 83 [21:16:54.708] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 23 structureChanged: false Elapsed: 32ms
Info 84 [21:16:54.708] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 85 [21:16:56.462] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 86 [21:16:56.490] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 24 structureChanged: false Elapsed: 28ms
Info 87 [21:16:56.490] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 88 [21:17:4.50] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 89 [21:17:4.77] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 25 structureChanged: false Elapsed: 27ms
Info 90 [21:17:4.78] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 91 [21:17:27.866] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 92 [21:17:27.907] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 26 structureChanged: false Elapsed: 41ms
Info 93 [21:17:27.907] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 94 [21:17:37.186] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 95 [21:17:37.220] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 27 structureChanged: false Elapsed: 34ms
Info 96 [21:17:37.220] Different program with same set of files:: oldProgram.structureIsReused:: 2
Info 97 [21:17:37.698] Starting updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json
Info 98 [21:17:37.728] Finishing updateGraphWorker: Project: /mnt/d/w_home/pptr/tsconfig.json Version: 28 structureChanged: false Elapsed: 30ms
Info 99 [21:17:37.728] Different program with same set of files:: oldProgram.structureIsReused:: 2
@Rom888 Check verbose output of https://github.com/neoclide/coc-eslint/
I'm seeing the same thing. How can I get the verbose log from coc-eslint?
I think this issue might be related to https://github.com/neoclide/coc-tsserver/issues/116 in some way.
Don't know if it's related but it also happen after modify file content outside of neovim.
https://github.com/neoclide/coc.nvim/issues/1118#issuecomment-571125502
@Rom888 Check verbose output of https://github.com/neoclide/coc-eslint/
@chemzqm , sorry I have not seen this message before.
This is verbose log from eslint:
https://gist.github.com/Rom888/6287c7422a4f50f01c64886389db63af
I stopped it just after the issue occurred (~40 lines of code were copied and pasted to the another place of the same file).
What about if it is you type too fast?
If you're using mac you can use applescript to type stuff quickly.
I'm not sure what combination of keystrokes to type to trigger the problem though
Aha, s/bleh/blooh screews it up if there are multiple occurences of bleh - sometimes
maybe...
facing the same issue, is there some fix / do we know the issue ?
@rsoeldner using :e updates the diagnostic correctly for me. Although it's not a solution to the problem it makes the linter usable.
i think coc/LS gets out of sync with the file's current state. sometimes i can hover a variable name and it says like symbol emaail doesnt exist even though the symbol is email. if i add a _ it might say emaa_il doesnt exist
I have found a way to replicate it!

I'd be curious to know if anyone can/can't replicate this
I've found out that if I load the file using FZF, then linting doesn't work, but if I load it from the command line or NERDTree, then it works.
We need connection log of coc.nvim to address this issue, please follow these steps:
let g:node_client_debug = 1 to your vimrc, save your vimrc and exit vim.Hmm it looks like i cant replicate the issue. it seems to come and go. I will keep trying to debug and get you logs when i can replicate
- Get the log filepath by :echo $NODE_CLIENT_LOG_FILE
Tried, but no output in vim (empty string).
Attached is a log file. I opened a file pendulum-waves.js using FZF, and no linting from COC. I opened another file, neo-pixel.js, using NERDTree, and it lints fine.
By the way, if you don't set $NODE_CLIENT_LOG_FILE before running nvim, it will create a file in /tmp instead.
Should be fixed now, if you still experience document out of synchronize, please create new issue and provide verbose output from language server and your vim version.
Why was my log file marked as off-topic? Are they two different issues?
Thanks @chemzqm 鉂わ笍
I think there is currently an issue on the latest version where if the file is edited using an outside editor (eg a lint --fix'er) then coc won't send the new version of the file to the language server
@dylan-chong make sure you're using latest release version of coc.nvim.
Hi, I am already using the latest 688776cf68e1199ca96dca1fb
Oh, that's the latest of the release branch, not master. Huh strange. I'll try out master and see how it goes
Most helpful comment
Should be fixed now, if you still experience document out of synchronize, please create new issue and provide verbose output from language server and your vim version.