Skip to content

Better handling of ClientCapabilities for different editors #1032

Description

@TheAngryByrd

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).

Activity

  1. baronfel commented on Oct 21, 2022

    @baronfel
    Contributor

    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.

  2. TheAngryByrd commented on Oct 21, 2022

    @TheAngryByrd
    MemberAuthor

    Sounds like a plan

  3. changed the title [-]Hide Ionide specific notifications LSP endpoints behind a flag[/-] [+]Better handling of ClientCapabilities for different editors[/+] on Jul 16, 2023
  4. added a commit that references this issue on Apr 1, 2026
    de040fa
  5. github-actions commented on Apr 1, 2026

    @github-actions
    Contributor

    🤖 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: 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.

    Generated by 🌈 Repo Assist at {run-started}. Learn more.

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@1f672aef974f4246124860fc532f82fe8a93a57e
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions