+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

@@ -340,15 +340,6 @@ each of the unit tests ran."
(after! (haskell-mode dante)
(setq dante-repl-command-line '("stack" "ghci")))
#+END_SRC
** Ocaml
Added ocaml-lsp support.
#+BEGIN_SRC elisp
(after! lsp
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "ocamllsp")
:major-modes '(tuareg-mode)
:server-id 'ocaml-lsp)))
#+END_SRC
** FSharp
#+BEGIN_SRC elisp
(after! fsharp

View File

@@ -52,7 +52,3 @@ Auto complete is essential to make the ultimate IDE experience™. Thus, company
#+BEGIN_SRC elisp
(package! company-arduino)
#+END_SRC
** Ocaml
#+BEGIN_SRC elisp
(package! tuareg)
#+END_SRC

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)