You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#60: Render ocamldoc markup in doc comments - {b bold}, {i italic}, [code], {[...]} code blocks, {!references} and @tags are now displayed with real faces via the new doc-markup font-lock feature (enabled at the default font-lock level).
#46: New neocaml-odoc-mode for odoc documentation pages (.mld), with font-lock, indentation, imenu, and language injection into {@lang[...]} code blocks for OCaml, dune and opam (Emacs 30+). Install its grammar with M-x neocaml-odoc-install-grammar.
#77: Add neocaml-mlx-mode, a major mode for .mlx files (OCaml with embedded JSX, as used by Melange/React), with JSX highlighting via tsx grammar injection (Emacs 30+).
#95: Complete findlib package names in neocaml-repl-require and neocaml-utop-require, using the packages ocamlfind list reports for the project's opam switch.
#96: Add neocaml-dune-test-file (C-c C-o T), neocaml-dune-promotion-diff (C-c C-o =) and neocaml-dune-promote-file (C-c C-o P) for running the current file's tests and reviewing and promoting their output, with C-c C-c, C-c C-r and C-c C-p doing the same in neocaml-cram-mode.
#102: Support OxCaml syntax, with font-lock and indentation for its keywords (stack_, exclave_, local_, etc.), modes and modalities, kinds, unboxed types and literals, immutable arrays and comprehensions, and kind definitions in imenu and defun navigation.
#107: Fontify OxCaml's builtin kinds (value, immediate, etc.), its SIMD vector types and the other predefined types (floatarray, eff, etc.) as builtins, and indent the @@ of a sig @@ portable starting a line, and an attribute like [@nontail] on its own line after a body.
#108: Fontify the toplevel's responses in neocaml-repl and neocaml-utop with tree-sitter, the signatures as in .mli buffers and the values as in .ml buffers (toggle with neocaml-repl-fontify-output and neocaml-utop-fontify-output).
#110: Add indentation styles: neocaml-indent-style selects ocp-indent (the default), or conventional and janestreet after ocamlformat's profiles, and when it's nil the style comes from the profile and cases-exp-indent of the project's .ocamlformat. M-x neocaml-set-indent-style and the OCaml menu switch the style of the current buffer.
#112: Take the indentation style from the project's .ocp-indent when it has no .ocamlformat, and ignore an .ocamlformat for the files ocamlformat leaves alone.
#113: Make the locations of errors, warnings and backtraces in files clickable in the neocaml-utop transcript, as they are in neocaml-repl.
#117: Warn when the installed dune grammar is older than release 0.1.0 of tree-sitter-dune, which neocaml-dune-mode needs, and say how to reinstall it.
#122: Render odoc's {@ocaml[ ... ]} code blocks in doc comments as code, like {[ ... ]} ones.
Changes
#118: Pin the menhir grammar to release v0.5.0 of tree-sitter-menhir instead of its master branch.
#93: Switch the dune grammar to release 0.1.0 of ocaml-dune/tree-sitter-dune, the grammar's new home, which fontifies more dune syntax (pforms, package tags, the ordered set language, etc.) and indents a field's value on a continuation line as dune's formatter does. Reinstall it with C-u M-x neocaml-dune-install-grammar.
#88: Switch the ocaml and ocaml-interface grammars to tree-sitter-ocaml v0.26.0 (the v0.26.0-abi14 tag), which parses the OxCaml extensions. Reinstall them with C-u M-x neocaml-install-grammars.
#99: Move the keys that clashed with ocaml-eglot and merlin: the REPL minor modes send the phrase at point with C-c C-e (was C-c C-p), send it and step with C-c C-s (was C-c C-n), load the file with C-c C-u (was C-c C-l) and interrupt with C-c C-q (was C-c C-i), and the dune commands move from C-c C-d to C-c C-o, in neocaml-dune-command-map.
#80: Use the hybrid forward-sexp function on every Emacs version, so C-M-f moves over whole keyword-led forms (fun, match, if, etc.) on Emacs 31+ instead of stopping after the keyword.
#100: Give each dune project in a monorepo its own REPL session, named with its path below the project.el root (e.g. *OCaml: mono/pkgs/core*), so dune utop loads the libraries of the project you're working in.
#111: Indent the signature of a functor's parameter as ocp-indent and ocamlformat's janestreet profile do, in the ocp-indent and janestreet styles.
#110: Indent as ocp-indent does by default, which moves a few layouts, like the cases of a (match ...), parameters and arguments on continuation lines, and the bodies of F (struct and (fun x ->.
Bug fixes
#122: Fix M-q and M-j in comments: M-q fills the paragraph at point instead of the comment's first one and leaves code and verbatim blocks as they are, and M-j continues the * starting a line.
#121: Offer the stanzas of dune-project and dune-workspace files at their top level in neocaml-dune-mode, instead of those of dune files, and no dune file fields inside them.
#120: Make neocaml-mlx-mode work with Eglot (with the ocaml.mlx language ID ocamllsp expects), indent JSX by its elements, keep the OCaml inside JSX from the tsx parser, and parse the code after a JSX element, which ended up in an error node with the rest of the buffer.
#117: Make completion in neocaml-dune-mode fit where point is, offering field names only where a field goes, profile names inside env and action names inside actions.
#115: Keep the lines of a comment where they are relative to it when indenting (in ocamllex and menhir files too), instead of moving them all to the column of its text, so code examples in doc comments and comments with a * starting each line keep their layout.
#114: Register neocaml-mode and neocaml-interface-mode with Eglot and dape when those load, so M-x eglot knows to start ocamllsp even when Eglot loads after the first OCaml buffer was opened, and add the Eglot entry after the user's own.
#112: Indent the OCaml in neocaml-mlx-mode buffers on Emacs 30 when the tsx grammar is installed, which went by the JSX rules instead.
#112: Indent more lines as ocp-indent and ocamlformat do, like string continuations after a backslash, type parameters on lines of their own and the module type after module type S =, and move the lines no rule covers along with their parent.
#112: Tell the lines inside a string from the parse tree alone, so quoted strings with text that looks like char literals in them, and top-level quoted extensions like {%%raw|...|}, keep their lines as they are.
#111: Leave the lines inside multi-line strings (the {|...|} ones of [%expect] blocks included) as they are when indenting, and stop moving a comment no rule covers further right every time it's indented.
#111: Indent the continuation lines no rule covered, like constructor arguments, record field types and values, typed patterns and module definitions broken across lines, as ocp-indent and ocamlformat do.
#110: Indent the arguments of a function that comes after a parenthesis or a bracket past the function, and the body of a fun on the line after let f : t = where the fun is, as ocp-indent and ocamlformat do.
#103: Indent with spaces in neocaml-mode and neocaml-interface-mode, as ocamlformat does, instead of a mix of tabs and spaces past column 8.
#104: Indent the lines that no indentation rule covered, which TAB and indent-region used to leave where they were, the way ocamlformat lays them out, like the continuation lines of operator chains and function types, tuple elements, or-patterns and labeled arguments.
#106: Follow more of ocamlformat's layout when indenting, like a leading ; in records and lists, ;; inside modules, the body of x >>= fun y ->, and item attributes and attribute payloads on lines of their own.
#102: Fontify the _ wildcard in patterns and types again, which tree-sitter-ocaml v0.26.0 parses as nodes of its own, and warn when the installed OCaml grammars are older than that.
#78: Don't treat " and ' delimiter nodes as sexps, so treesit-thing-at before a string or char literal returns the whole literal instead of the bare quote.
#79: Fix a segfault on Emacs 31.1 when font-locking a buffer containing a builtin type or value (let x : int = 42 was enough to trigger it).
#94: Make neocaml-format-buffer and neocaml-dune-format-buffer replace only the text that changed, so point, markers and window positions stay put and an already formatted buffer isn't marked modified.
#91: Fix the dune-utop flavor of neocaml-utop failing to start - it passed the project root to dune utop as an absolute path, which dune rejects, so it now runs dune utop . from the project root instead.
#100: Make the dune-utop flavor of both REPL backends run dune utop with neocaml-dune-program and neocaml-dune-use-opam-exec, and make neocaml-repl-flavor set to dune-utop (e.g. from .dir-locals.el) run dune utop from the project root instead of the plain toplevel.
#100: Make neocaml-dune-project-root-files pick the nearest directory containing any of the listed files, as documented, instead of trying the files in order and taking the first match at any depth, and honor it in library and package completion too.
#108: Fix the highlighting in REPL buffers: font-lock in neocaml-repl failed on every fontification, the errors in the neocaml-utop transcript lost their face, and neocaml-repl didn't highlight the toplevel's errors, uncaught exceptions, and warnings in their current form (Warning 26 [unused-var]:).
#109: Make the file locations in the toplevel's errors, warnings and backtraces clickable in neocaml-repl buffers, and don't take //toplevel//, the toplevel's name for its input, for a file.