python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 187 forks source link

Add version support to `workspace/publishDiagnostics` #565

Open Dylmay opened 4 weeks ago

Dylmay commented 4 weeks ago

Currently we do not pass version information when we are publishing diagnostics. See: LSP protocol

Now we pass the version information so the client can create an opinion as to whether the current diagnostics are valid or not for the workspace

Dylmay commented 4 weeks ago

There is a versionSupport capability passed by the client which we could check beforehand but the field is optional and we already track the document version so I don't believe there is much reason to change behaviour based on it