You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better handling of ClientCapabilities for different editors #1032
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.
Put a flag in so we know we're talking to Ionide, otherwise just no-op the fsharp/ calls. (quick)
Better handling at the LSP Client level at parsing bad information from standard in (unsure how much work is related here)
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).
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.
changed the title [-]Hide Ionide specific notifications LSP endpoints behind a flag[/-][+]Better handling of ClientCapabilities for different editors[/+]on Jul 16, 2023
I've created a fix for this: PR [guard Ionide-specific fsharp/ notifications with client capability check].
Root cause: FSharpLspClient sends fsharp/notifyWorkspace, fsharp/notifyWorkspacePeek, fsharp/fileParsed, fsharp/documentAnalyzed, fsharp/testDetected, and fsharp/notifyCancel unconditionally to all clients, regardless of whether the client understands these notifications.
Fix: Added SupportsCustomFSharpNotifications flag to FSharpLspClient. During Initialize, the flag is set to true only when the client sends Ionide configuration in InitializationOptions — a reliable signal that the client is Ionide. All six custom notification methods now check this flag before sending.
This follows the same pattern already used for CodeLensRefresh and WindowWorkDoneProgressCreate which check ClientCapabilities before sending. Non-Ionide clients (Emacs, Helix, Neovim without special config) will no longer receive these unexpected notifications.
Activity
baronfel commentedon Oct 21, 2022
We already keep the clientCapabilities locally - we should look at the info that we get on the
initializerequest that describe the client, and for these clients that don't support the custom notifications set a flag that enables/disables those notifications.TheAngryByrd commentedon Oct 21, 2022
Sounds like a plan
[-]Hide Ionide specific notifications LSP endpoints behind a flag[/-][+]Better handling of ClientCapabilities for different editors[/+]Guard fsharp/ custom notifications with client capability check
github-actions commentedon Apr 1, 2026
🤖 This is an automated response from Repo Assist.
I've created a fix for this: PR [guard Ionide-specific fsharp/ notifications with client capability check].
Root cause:
FSharpLspClientsendsfsharp/notifyWorkspace,fsharp/notifyWorkspacePeek,fsharp/fileParsed,fsharp/documentAnalyzed,fsharp/testDetected, andfsharp/notifyCancelunconditionally to all clients, regardless of whether the client understands these notifications.Fix: Added
SupportsCustomFSharpNotificationsflag toFSharpLspClient. DuringInitialize, the flag is set totrueonly when the client sends Ionide configuration inInitializationOptions— a reliable signal that the client is Ionide. All six custom notification methods now check this flag before sending.This follows the same pattern already used for
CodeLensRefreshandWindowWorkDoneProgressCreatewhich checkClientCapabilitiesbefore sending. Non-Ionide clients (Emacs, Helix, Neovim without special config) will no longer receive these unexpected notifications.