Summary
Add F# support via tree-sitter + LSP enrichment, complementing existing C# support in the .NET ecosystem.
Tooling
| Component |
Tool |
Notes |
| Tree-sitter grammar |
tree-sitter-fsharp |
Ionide project, actively maintained |
| LSP server |
FsAutoComplete |
Community standard, mature |
| SCIP indexer |
None (scip-dotnet covers C#/VB but not F#) |
N/A |
What to implement
Language notes
- F# uses significant whitespace (indentation-based scoping, like Python)
- Function application is by juxtaposition (
f x y), not parentheses — the extractor must recognize this pattern
- Pipe operator
|> is idiomatic: data |> List.map transform |> List.filter pred — each function in the chain is a call edge
.fsi files are signature files (like .d.ts for TypeScript) — should be indexed in declaration mode
- Discriminated unions (
type Shape = Circle of float | Rectangle of float * float) are key type declarations
- Computation expressions (
async { ... }, task { ... }) contain call-like constructs
Context
Complements existing C# support. F# and C# co-exist in .NET solutions and interop freely. Finance and data-heavy .NET projects increasingly use F#.
Summary
Add F# support via tree-sitter + LSP enrichment, complementing existing C# support in the .NET ecosystem.
Tooling
tree-sitter-fsharpFsAutoCompleteWhat to implement
tree-sitter-fsharpas an npm dependencysrc/indexer/extractors/fsharp.ts:let funcName args = bodyas function symbolstype TypeName = ...as type symbols (discriminated unions, records, classes)module ModuleNameas module symbolsmember this.MethodName(args)as method symbolsfuncName arg1 arg2) as call refsx |> f |> g) — each piped function is a call refopen Module.Pathas importsfsharpinSourceIndexStageEXTRACTORS map andParserPoolLANG_PACKAGESfsautocompletetosrc/indexer/lsp/registry.ts:{ command: 'fsautocomplete', args: ['--adaptive-lsp-server-enabled'] }.fs,.fsi,.fsxto walkertests/fixtures/fsharp/Language notes
f x y), not parentheses — the extractor must recognize this pattern|>is idiomatic:data |> List.map transform |> List.filter pred— each function in the chain is a call edge.fsifiles are signature files (like.d.tsfor TypeScript) — should be indexed in declaration modetype Shape = Circle of float | Rectangle of float * float) are key type declarationsasync { ... },task { ... }) contain call-like constructsContext
Complements existing C# support. F# and C# co-exist in .NET solutions and interop freely. Finance and data-heavy .NET projects increasingly use F#.