Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump LanguageServerProtocol and react to API changes #1096

Merged
merged 3 commits into from
Apr 11, 2023

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Apr 4, 2023

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, and Helpers types and modules in the src and test directories.

🤖 Generated by Copilot at 532910f

This pull request is quite a mix
It adds features and also fixes
Diagnostics are smart
CallHierarchy can start
And TypeHierarchy joins the tricks

🛠️🌟🐛

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

  • Add ClientSupportsDiagnostics property to DiagnosticCollection type to control whether to collect and send diagnostics to the client (link)
  • Set ClientSupportsDiagnostics property of diagnosticCollections field based on client capabilities in AdaptiveFSharpLspServer and FSharpLspServer types (link, link)
  • Add stubs for call hierarchy and type hierarchy methods to AdaptiveFSharpLspServer and FSharpLspServer types to comply with protocol specification (link, link)
  • Set TreatUnmatchedTokensAsErrors property of rootCommand value to false in Parser module to fix a bug that caused some clients to fail to start the server (link)
  • Add warnOnUnknownOptions middleware function to Parser module to write a warning message when unknown options are encountered (link, link)
  • Fix typo and add call hierarchy and type hierarchy properties to textDocumentCapabilities value in Range module in test code (link, link)

Stub out Call/Type heirarchy members in both LSP server implementations. Since some clients don't support PublishDiagnostics we not check client capabilities in the DiagnosticsCollection before sending any of those notifications
@baronfel baronfel merged commit 935bf6e into ionide:main Apr 11, 2023
@baronfel baronfel deleted the update-LSP-lib branch April 11, 2023 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants