Bozhidar Batsov announces fsharp-ts-mode, a new Tree-sitter-based F# major mode for Emacs. Built on the same architecture as his neocaml package, the 0.1.0 release includes syntax highlighting with 4 customizable levels, Tree-sitter indentation, imenu with qualified names, F# Interactive REPL integration, dotnet CLI integration, .NET API documentation lookup, and Eglot/FsAutoComplete LSP support. The post details technical challenges encountered: F#'s offside rule creates a chicken-and-egg problem with indentation-sensitive parsing, the fsharp and fsharp_signature grammars are independent with differing node types, and .fsx script files cause progressive indentation issues due to grammar quirks. Migration from the older fsharp-mode is straightforward, though automatic LSP server installation is not yet supported. A MELPA PR has been filed.

7m read timeFrom batsov.com
Post cover image
Table of contents
Why F#?The NameBuilt on neocaml’s FoundationWhat’s in 0.1.0Lessons LearnedCurrent StatusWrapping Up

Sort: