autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 272 forks source link

Only send textDocument/didSave if server advertises support for it #1188

Closed martskins closed 3 years ago

martskins commented 3 years ago

This PR changes the implementation of textDocument/didSave as to only send the notification if the server has advertised support for it.

For the sake of fixing the currently broken servers faster and for making this PR easier to review I only included the check for the didSave notification, but we should probably do the same with all the others.

Fixes #834