bump LanguageServerProtocol and react to API changes #1096
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
🤖 Generated by Copilot at 532910f
This pull request improves the compatibility and functionality of the F# language server by respecting the client capabilities for diagnostics and adding placeholders for new features. It also fixes a bug in the command-line parser and updates the test code. The changes affect the
AdaptiveFSharpLspServer
,FSharpLspServer
,DiagnosticCollection
,Parser
, andHelpers
types and modules in thesrc
andtest
directories.🤖 Generated by Copilot at 532910f
🛠️🌟🐛
WHY
We want to stop breaking some clients, so we need to conditionally send diagnostics to the client, as well as have some kind of way to handle older CLI args that have been removed.
HOW
🤖 Generated by Copilot at 532910f
ClientSupportsDiagnostics
property toDiagnosticCollection
type to control whether to collect and send diagnostics to the client (link)ClientSupportsDiagnostics
property ofdiagnosticCollections
field based on client capabilities inAdaptiveFSharpLspServer
andFSharpLspServer
types (link, link)AdaptiveFSharpLspServer
andFSharpLspServer
types to comply with protocol specification (link, link)TreatUnmatchedTokensAsErrors
property ofrootCommand
value to false inParser
module to fix a bug that caused some clients to fail to start the server (link)warnOnUnknownOptions
middleware function toParser
module to write a warning message when unknown options are encountered (link, link)textDocumentCapabilities
value inRange
module in test code (link, link)