Skip to content

Port a batch of improvements from neocaml - #18

Merged
bbatsov merged 10 commits into
mainfrom
port-neocaml-improvements
Jun 24, 2026
Merged

Port a batch of improvements from neocaml#18
bbatsov merged 10 commits into
mainfrom
port-neocaml-improvements

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 24, 2026

Copy link
Copy Markdown
Owner

This ports a batch of improvements that landed in the sibling neocaml mode over the last few months, adapting them where F# differs from OCaml.

Highlights:

  • Fantomas formatting (fsharp-ts-format-buffer, C-c C-f) with optional format-on-save
  • Clickable URLs and bug references in comments
  • Interactive font-lock level selector and a reorganized mode menu (Navigate/Edit/Toggle/Font-Lock/Documentation submenus + REPL launcher)
  • project.el integration for .sln/.slnx/.fsproj projects
  • Per-project F# Interactive buffers, a REPL flavor choice (dotnet/fsharpi), restart, a REPL buffer menu, send-definition-and-step, and a #r "nuget:" helper

Two things were adapted rather than copied verbatim: neocaml's ;;-phrase stepping became definition stepping (F# source has no ;; delimiters), and #require became #r "nuget: ...".

Tests and docs included; byte-compile is clean with --warnings-as-errors and the linters pass.

bbatsov added 10 commits June 24, 2026 10:45
Scope scroll restoration to the window actually showing the buffer so
format-on-save during a non-interactive save can't disturb an unrelated
window, and only treat an integer exit code of 0 as success (call-process
returns a string when the process is signalled). Also require cl-lib
explicitly for the project.el cl-defmethods rather than relying on a
transitive require.
fsharp-ts-repl--buffer returns a buffer name, which need not name a live
buffer; clear-buffer now errors cleanly instead of signalling from
with-current-buffer when no REPL is running. The flavor-mismatch prompt
no longer fires (showing nil) when the running REPL's flavor is unknown.
@bbatsov
bbatsov merged commit 33b568b into main Jun 24, 2026
3 checks passed
@bbatsov
bbatsov deleted the port-neocaml-improvements branch June 24, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant