ionide / FsAutoComplete

F# language server using Language Server Protocol
Other
409 stars 154 forks source link

Better handling of ClientCapabilities for different editors #1032

Open TheAngryByrd opened 1 year ago

TheAngryByrd commented 1 year ago

After troubleshooting some other LSP Clients (namely emacs and helix) on the Discord server, FSAC will eventually crash. It seems these clients have trouble with the fsharp/ specific notifications that come from FSAC. Fsharp language server put in some fixes regarding this type of behavior too. I'm unsure what exactly the best path of action is here.

  1. Put a flag in so we know we're talking to Ionide, otherwise just no-op the fsharp/ calls. (quick)
  2. Better handling at the LSP Client level at parsing bad information from standard in (unsure how much work is related here)
  3. Make other clients not send stuff to standard in when they receive notifications they can't handle (given 2 separate editors seem to have this behavior, I'm unsure if they're at fault here).
baronfel commented 1 year ago

We already keep the clientCapabilities locally - we should look at the info that we get on the initialize request that describe the client, and for these clients that don't support the custom notifications set a flag that enables/disables those notifications.

TheAngryByrd commented 1 year ago

Sounds like a plan