-
-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving will trigger all files to recompile and intellisense does not work during that #649
Comments
It's feature of tsserer, the problem is
Notice |
@chemzqm I tried multiple projects, looks like the {
"compilerOptions": {
"module": "es2015",
"baseUrl": "app"
},
"exclude": ["node_modules"]
}
|
Because your configuration is wrong, you should use paths instead of baseUrl. |
@chemzqm I don't think that matters, I just created a random jsconfig.json {
"compilerOptions": {
"module": "es2015"
}
} |
Same problem with VSCode, ask https://github.com/Microsoft/TypeScript for help. |
I actually checked VS Code 's tsserver.log, it does not have this issue. |
@chemzqm Actually I noticed a very interesting thing, not sure if it can remind you anything: echo '; const a = 1;' >> /path/to/that_file.js then come back to vim and
The structureChanged is But if I just do I only have one file in buffers, and I didn't use |
I got same behavior with VSCode. |
Although I have log same as your's but I didn't experience any slow for completion or goto definition request just after save. |
Here's my complete vimrc: inoremap jk <ESC>
call plug#begin('~/.local/share/nvim/plugged')
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}
Plug 'pangloss/vim-javascript'
Plug 'HerringtonDarkholme/yats.vim'
call plug#end()
nmap <silent> <c-]> <Plug>(coc-definition) nvim-ts-log after
Notice the coc tsserver channel
Can you point me where I should look at in coc.vim's code to help identify the issue? I'm wondering where do we send message to tsserver.js to notify the file is saved. |
hmm, I think I might know what's going on.... It might be related to vim's weird |
I think that's why... VIM just always create a file to check if the directory is writable.. And every time when a new file is created, it makes the tsserver to think the structure is changed.. |
And I do agree this has nothing to do with coc.nvim now. I can reproduce this easily by doing something like |
I tried several methods and dived into typescript source code, the set nobackup
set backupcopy=no
set noswapfile
set noundofile Nothing really work... |
Ah I finally got it work, there's another setlocal nobackup
setlocal nowritebackup Finally! 💯 |
Looks like related to microsoft/TypeScript#30663, I've downgrade tsserver to 3.3.4000 to avoid this problem. |
Result from CocInfo
Describe the bug
When I save the a file, even without changing it, tsserver will recompile the whole project. This make all the intellisense and jump definition usable at all during recompiling.
To Reproduce
set coc-settings.json
Start neovim with command:
nvim -u mini.vim
open any js/typescript project with jsconfig.json/tsconfig.json. save one file.
check tsserver.log
The text was updated successfully, but these errors were encountered: