Skip to content

F# completion can never offer the auto-open hint C# offers #221

Description

@MelbourneDeveloper

Symptom

F# completion never shows the (open Ns) hint that tells the user a completion will insert an open. C# shows the equivalent (import) ns. The code to render it exists but cannot execute.

Root cause

src/sidecars/SharpLsp.Sidecar.FSharp/FSharpCompletion.fsgetCompletions calls GetDeclarationListInfo with getAllSymbols = fun () -> []. With no symbol source, FCS never populates NamespaceToOpen, so it is always None and detailFor:57 is unreachable.

The same root cause leaves detailFor:51 (_ -> "Keyword") dead: no keyword items are returned either.

Fix direction

Supply a real getAllSymbols so FCS can offer unopened-namespace completions, then verify NamespaceToOpen reaches detailFor. Note this is the expensive path in FCS — it should be measured against the completion budget in CLAUDE.md (<100ms p50, <200ms p95) before landing.

Why this matters

This is a missing feature rather than only missing coverage, and it is exactly the shape CLAUDE.md aim #2 forbids: C# has the affordance, F# does not.

Provenance

Found while raising F# sidecar coverage for PR #218. Two lines that looked like dead code turned out to be a feature that cannot run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions