Files
dotfiles/doom.d/modules/private/ocaml/config.el
odave b6f7779397 +custom ocaml module
This ocaml module has proper lsp support, and has the bindings I require
regularly. I use utop to REPL my code, with bindings to send parts of my
code to UTOP
2020-03-26 13:52:22 +00:00

21 lines
569 B
EmacsLisp

;;; private/ocaml/config.el -*- lexical-binding: t; -*-
(use-package! utop
:config
(map!
:localleader
:map tuareg-mode-map
:desc "Repl" "c" #'utop
(:prefix ("e" . "eval")
:desc "Buffer" "b" #'utop-eval-buffer
:desc "Region" "r" #'utop-eval-region)))
(when (featurep! +lsp)
(after! lsp
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "ocamllsp")
:major-modes '(tuareg-mode)
:server-id 'ocaml-lsp))
(add-hook 'tuareg-mode-hook #'(lambda () (lsp-mode)))))