+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
This commit is contained in:
odave
2020-03-26 13:52:22 +00:00
parent 60237c6ebc
commit b6f7779397
4 changed files with 26 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
;;; 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)))))

View File

@@ -0,0 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; private/ocaml/packages.el
(package! tuareg)
(package! utop)