Skip to content

Commit

Permalink
Use ocaml-ts-mode and enable LSP for it
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Aug 2, 2024
1 parent 9dcdb02 commit 247d6e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lisp/init-ocaml.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
(define-key tuareg-mode-map (kbd "C-c C-z") 'sanityinc/tuareg-repl-switch)
(define-key tuareg-interactive-mode-map (kbd "C-c C-z") 'sanityinc/tuareg-repl-switch-back)))

(when (and (fboundp 'treesit-available-p) (treesit-available-p))
(require-package 'ocaml-ts-mode)
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '(((ocaml-ts-mode :language-id "ocaml")) "ocamllsp"))))

(when (maybe-require-package 'dune)
(maybe-require-package 'dune-format))

Expand Down

0 comments on commit 247d6e1

Please sign in to comment.