A modern, tree-sitter-powered Emacs major mode for Haskell.
README.md
# curry-mode `curry-mode` is a modern, tree-sitter-powered Emacs major mode for Haskell. It provides font-lock, indentation, navigation, imenu, GHCi REPL integration, and Cabal build commands. Delegating all semantic features (completion, go-to-definition, type info, code actions) to HLS via Eglot. ## Why? Because `haskell-mode` has grown complex over the years, bundling everything from indentation to REPL to HLS interaction in one monolith. With tree-sitter built into Emacs 29+ and HLS providing all semantic features via LSP, a modern Haskell mode can be dramatically simpler. The architecture follows [neocaml](https://github.com/bbatsov/neocaml) and [fsharp-ts-mode](https://github.com/bbatsov/fsharp-ts-mode): a thin tree-sitter mode for syntax, with everything semantic delegated to the language server. ## Features - Tree-sitter based font-locking (4 levels) for `.hs`, `.lhs`, `.hsc`, and `.hs-boot` files - Tree-sitter based indentation with cycle-indent and shift-region support - Auto-detection of indentation offset from existing code - Navigation (`beginning-of-defun`, `end-of-defun`, `forward-sexp`, sentence movement with `M-a`/`M-e`) - Imenu with categories for Functions, Types, Classes, Instances, and Imports - Toggling between `.hs` and `.lhs` via `ff-find-other-file` (`C-c C-a`) - GHCi REPL integration (`curry-repl`) with tree-sitter input fontification - Comment support: `fill-paragraph` (`M-q`), comment continuation (`M-j`), and `comment-dwim` (`M-;`) - Electric indentation and electric pairs (parentheses, brackets, braces, backticks, quotes) - Cabal file editing (`curry-cabal-mode`) with font-lock, indentation, imenu, and `cabal-fmt` integration - Cabal build commands (`curry-cabal-interaction-mode`) -- build, test, run, clean, repl, haddock - Easy installation of the Haskell tree-sitter grammar via `M-x curry-install-grammars` - Compilation error regexp for GHC output (`M-g n` / `M-g p`) - Eglot integration (auto-configured for `haskell-language-server-wrapper`) - Debugging via [dape](https://git…