Releases: bbatsov/neocaml
Releases · bbatsov/neocaml
v0.8.1
Bug fixes
- #57: Stop passing
-emacsto utop inneocaml-dune-utop(and drop it from the recommended config in the docs). That flag activates utop's structured protocol intended for the oldutop.el, whichneocaml-repldoesn't implement, so the protocol output was leaking into the REPL buffer. - #58:
neocaml-backward-up-listnow jumps out of optional parameters with defaults (e.g.,?(foo = 123)) instead of erroring with "At top level". - #53: Capture stderr separately when running
dune format-dune-file, so theEntering directory/Leaving directorymarkers newer dune versions emit on stderr no longer wrap the formatted buffer.
Changes
- #42: Lower the tree-sitter ABI requirement from 15 to 14 across
neocaml-opam-mode,neocaml-dune-mode, andneocaml-ocamllex-mode, so they work on Emacs built against tree-sitter 0.24 (e.g., the homebrew Emacs 30 on macOS). Switch the menhir recipe to tmcgilchrist/tree-sitter-menhir and pin the ocamllex recipe back to v0.24.0, both of which target ABI 14.
v0.8.0
New features
- #47: Add
neocaml-backward-up-list, bound toC-M-u, for jumping out of the enclosing OCaml block (struct/sig/object, records, arrays, etc.). The built-inbackward-up-listdoesn't understand keyword-delimited constructs on Emacs 29/30. - #41:
neocaml-dune-modenow activates fordune-workspacefile variants likedune-workspace.cianddune-workspace.5.3. - Add
neocaml-cram-modefor editing cram test (.t) files with tree-sitter font-lock, indentation, and imenu. - Add
neocaml-dune-format-bufferfor formatting dune files viadune format-dune-file. - Register neocaml modes with
dapeforocamlearlybirddebugging support. - Register file associations for
.ocamlinit,.ocamlformat, and.ocp-indentfiles. - Extend
neocaml-opam-modeto activate for.opam.templatefiles. - Include per-grammar ABI version in
neocaml-bug-report-infooutput.
Changes
- The
_build/directory redirect inneocaml-dune-modeis now optional (controlled byneocaml-dune-redirect-build-dir).
v0.7.1
v0.7.0
New features
- #36: Add
neocaml-ocamllex-modefor editing OCamllex (.mll) files with tree-sitter font-lock, indentation, imenu, and defun navigation. Embedded OCaml code inside{ }blocks gets full syntax highlighting via language injection when the OCaml grammar is installed. Based on the tree-sitter-ocamllex grammar. - #36: Add
neocaml-menhir-modefor editing Menhir (.mly) files with tree-sitter font-lock, indentation, imenu, and defun navigation. Embedded OCaml code inside{ }and%{ %}blocks gets full syntax highlighting via language injection. Based on the tree-sitter-menhir grammar. - Register
neocaml-modeandneocaml-interface-modewitheglot-server-programssoeglot-ensureworks out of the box withocamllsp.
Bug fixes
- #37: Guard ABI 15 grammars (ocamllex, menhir) on Emacs 30+ and include ABI version in
neocaml-bug-report-info. - Language injection in ocamllex and menhir modes now requires Emacs 30+ (injection queries are not supported on Emacs 29).
v0.6.0
Bug fixes
- #34: Fix indentation of continuation lines inside multi-line comments. Lines now align with the body text after the opening delimiter.
New features
- Add
neocaml-dune-modefor editing dune, dune-project, and dune-workspace files with tree-sitter font-lock, indentation, imenu, and defun navigation. Based on the tree-sitter-dune grammar. - Add
neocaml-opam-modefor editing opam package files with tree-sitter font-lock, indentation, and imenu. Based on the tree-sitter-opam grammar. - Add
neocaml-dune-interaction-mode, a minor mode for running dune commands (build, test, clean, promote, fmt, utop, exec) from any neocaml buffer viacompile. Includes watch mode support via prefix argument and a Dune menu. - Add flymake backend for
opam lintinneocaml-opam-mode. Enabled by default when theopamexecutable is found. - Add tree-sitter font-locking for REPL input via
comint-fontify-input-mode. Code typed in the REPL now gets the same syntax highlighting as regular.mlbuffers. Controlled byneocaml-repl-fontify-input(defaultt).
v0.5.0
Bug fixes
- #26: Preserve list items and odoc tags as paragraph boundaries when filling comments.
- #27:
neocaml-install-grammarsnow accepts a prefix argument (C-u) to force reinstallation of grammars, even if they are already installed. - Avoid the superfluous spaces after the prompt of the REPL when sending code to the REPL via the commands
neocaml-repl-send-*. - #28: Fix
delete-pairdeleting the wrong closing delimiter. Add alistthing totreesit-thing-settingsand a hybridforward-sexpthat falls back to syntax-table matching on delimiter characters.
New features
- Support
outline-minor-modefor folding top-level definitions (Emacs 30+). - Support
which-func-modefor displaying the current definition name in the mode line. - Add
neocaml-objinfo-modefor viewing OCaml compiled artifacts (.cmi,.cmo,.cmx,.cma,.cmxa,.cmxs,.cmt,.cmti) viaocamlobjinfo. Includes font-lock, imenu navigation, and revert support. - Set
treesit-primary-parserfor Emacs 31+ compatibility.
v0.4.1
v0.4.0
Bug fixes
- #20: Work around broken
transpose-sexpson Emacs 30 (bug#60655). Falls back to default transpose behavior; Emacs 31 has a proper fix. - #22: Fix compilation regexp to handle arbitrary leading whitespace in OCaml error messages.
- #22: Fix off-by-one in compilation column positions. OCaml uses 0-indexed columns; the begin-column is now correctly converted to Emacs's 1-indexed columns.
Changes
- Bump required tree-sitter-ocaml grammar from v0.24.0 to v0.24.2. Users must reinstall their grammars via
M-x neocaml-install-grammars. The upstream release includes breaking changes to the parse tree structure (see tree-sitter-ocaml#126). - neocaml now warns at startup if the installed grammar is older than expected.
- Reorganize font-lock feature levels to align with Emacs conventions:
typemoved to level 2,numbermoved to level 3,escape-sequencesplit into its own feature at level 3, andpropertyandlabelsplit into their own features at level 4.
New features
- Add
neocaml-mark-sentencecommand to mark the current statement around point. - Add
neocaml-bug-report-infocommand for collecting debug information in bug reports. - Add "Navigate" submenu to the OCaml menu with structural navigation commands.
- Add mark and transpose commands to the OCaml menu.
- Highlight escape sequences (
\n,\t, etc.) in strings withfont-lock-escape-face. - Highlight conversion specifications (
%d,%s, etc.) in format strings withfont-lock-regexp-face. - Highlight
match+and similar binding operators as keywords in match expressions. - #23: Add
iarrayto the list of builtin types.
v0.3.0
Bug fixes
- Fix
M-q(fill-paragraph) not indenting continuation lines in comments. - Fix
M-;(comment-dwim) failing to remove*)when uncommenting a region.
New features
- Add
comment-indent-new-linesupport:M-jinside comments continues the comment with proper indentation. - Highlight binding operators (
let*,let+,and*,and+) as keywords. - Add
electric-indent-charsfor{}()soelectric-indent-modereindents after typing delimiters. - Add
fill-paragraphsupport for OCaml(* ... *)comments via tree-sitter. - Document
outline-minor-modeandtreesit-foldfor code folding in README.
v0.2.0
Bug fixes
- Fix
compile-goto-errorlanding one column before the actual error position. OCaml uses 0-indexed columns;compilation-first-columnis now set to 0 accordingly. - Fix
neocaml-repl-send-definitionsignaling an error when point is not inside a definition. - Fix
;;terminator detection: only check whether input ends with;;instead of searching anywhere in the string, avoiding false positives from;;inside strings or comments. - Fix
neocaml-repl-send-phraseto skip;;inside strings and comments when locating phrase boundaries.
New features
- Add
neocaml-repl-load-file(C-c C-l): load the current file into the REPL via the#usedirective. - Add REPL input history persistence across sessions via
neocaml-repl-history-fileandneocaml-repl-history-size. - Flash the sent region when evaluating code in the REPL (
send-region,send-definition,send-phrase,send-buffer).
Changes
- Introduce
neocaml-base-modeas the shared parent forneocaml-modeandneocaml-interface-mode. Users can hook intoneocaml-base-mode-hookto configure both modes at once. - Improve
utopsupport: strip ANSI escape sequences and recognize utop's prompt format so point is correctly placed after the prompt. - Make
C-c C-zreversible: from a source buffer it switches to the REPL, from the REPL it switches back. - Add
_builddirectory awareness: when opening a file under_build/, offer to switch to the source copy (supports dune and ocamlbuild layouts). - Split
neocaml-prettify-symbols-alistinto a column-width-safe base list andneocaml-prettify-symbols-extra-alist(fun->λ,->->→,not->¬). Control extra symbols with theneocaml-prettify-symbols-fulltoggle. - Register OCaml build artifact extensions (
.cmo,.cmx,.cmi, etc.) incompletion-ignored-extensionsto declutterfind-filecompletion. - Bind
C-c C-ctocompileinneocaml-mode(shadowed byneocaml-repl-send-definitionwhen the REPL minor mode is active). - Extend
neocaml-other-file-alistto support.mll,.mly, and.eliom/.eliomifile pairs forff-find-other-file. - Register OCaml compilation error regexp for
M-x compilesupport (errors, warnings, alerts, backtraces). - Add
treesit-thing-settingsfor sexp, sentence, text, and comment navigation (Emacs 30+). - Add sentence navigation (
M-a/M-e) for moving between top-level definitions. transpose-sexpsnow works with tree-sitter awareness (Emacs 30+).- Replace automatic grammar installation with the interactive command
M-x neocaml-install-grammars. - Remove
neocaml-ensure-grammarsdefcustom. - Remove
neocaml-use-prettify-symbolsandneocaml-repl-use-prettify-symbolsdefcustoms.prettify-symbols-alistis now always set; users enableprettify-symbols-modevia hooks.