neoclide / coc-tsserver

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

A space is inserted between empty braces after saved files several times #241

Closed perfectspr closed 3 years ago

perfectspr commented 3 years ago

After I saved files several times , a space is inserted between empty braces.

listen: () => {}  

changed to

listen: () => { }  

my coc-settings.json file:

{  
  "suggest.noselect": false,  
  "suggest.enablePreview": true,  
  "python.formatting.provider": "black",  
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,  
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,  
  "coc.preferences.formatOnType": true,  
  "coc.preferences.formatOnSaveFiletypes": [  
    "*"  
  ],  
  "typescript.referencesCodeLens.enable": false,  
  "diagnostic.errorSign": "•",  
  "diagnostic.warningSign": "•",  
  "diagnostic.infoSign": "•"  
  "suggest.maxCompleteItemCount": 15  
}  
chemzqm commented 3 years ago

Should be problem of your language server, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel

perfectspr commented 3 years ago

After update plugins, the issue is fixed. Thank you.

chemzqm commented 3 years ago

Should be bug of tsserver, I have this issue sometimes.