From c1ac8bc37a34bdb495e91ab30e7a0b633b43afb0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Aug 2025 17:11:42 +0200 Subject: [PATCH] refactor(ocaml): remove tree-sitter support No *-ts-mode exists for tuareg-mode. There *is* a ocaml-ts-mode, but it's too rudimentary. The ocaml module will fall back to font-lock rules so this is not a breaking changing. --- modules/lang/ocaml/README.org | 3 --- modules/lang/ocaml/config.el | 4 ---- modules/lang/ocaml/doctor.el | 4 ---- 3 files changed, 11 deletions(-) diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index c062f1aec..d6b824b35 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -23,9 +23,6 @@ This module adds [[https://ocaml.org/][OCaml]] support to Doom Emacs, powered by - +lsp :: Enable LSP support for ~tuareg-mode~. Requires [[doom-module::tools lsp]] and a langserver (supports [[https://github.com/freebroccolo/ocaml-language-server][ocaml-language-server]]). -- +tree-sitter :: - Leverages tree-sitter for better syntax highlighting and structural text - editing. Requires [[doom-module::tools tree-sitter]]. ** Packages - [[doom-package:dune]] diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 4ca5805d5..a270252f0 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -130,10 +130,6 @@ (opam-switch-set-switch (tuareg-opam-current-compiler))) -(when (modulep! +tree-sitter) - (add-hook 'tuareg-mode-local-vars-hook #'tree-sitter!)) - - (use-package! dune :defer t :config diff --git a/modules/lang/ocaml/doctor.el b/modules/lang/ocaml/doctor.el index 07facc1d3..4879155b9 100644 --- a/modules/lang/ocaml/doctor.el +++ b/modules/lang/ocaml/doctor.el @@ -5,10 +5,6 @@ (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (modulep! +tree-sitter)) - (modulep! :tools tree-sitter)) - "This module requires (:tools tree-sitter)") - (unless (executable-find "ocamlmerlin") (warn! "Couldn't find ocamlmerlin. Lookup, completion and syntax checking won't work"))