neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

option to suppress tsserver diagnostics #275

Closed MagicDuck closed 3 years ago

MagicDuck commented 3 years ago

First of all, thanks for the great work on this plugin! It's really awesome how well everything works out of the box! :heart: I am running into a slight issue though that I would appreciate some assistance with: If I want to have auto-import of symbol under cursor be available as a code action, the following option needs to be turned on in jsconfig.json:

{
  "compilerOptions": {
    "checkJs": true,
...

Which is fine and expected as per vscode docs.

The trouble is, at least in my particular case, that when that option is turned on, I also start getting a bunch of other diagnostics from tserver that I don't care about, such as type violations ,etc. Ex: image This makes it hard to pick out the actual eslint diagnostics I need to fix before committing my code. I am wondering if an option could be added to suppress the tsserver diagnostics?

chemzqm commented 3 years ago

No, unless tsserver ptovide it , Avoid checkJS or use ts-ignore comment