From 0d833adbfe4a4d9cd842762767f45420d2c7e036 Mon Sep 17 00:00:00 2001 From: Zelong Kuang Date: Wed, 17 Dec 2025 03:55:28 +1100 Subject: [PATCH] Ocaml --- init.el | 1 + lisp/init-bindings.el | 2 ++ lisp/init-ocaml.el | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 lisp/init-ocaml.el diff --git a/init.el b/init.el index 7e9044e..9b7e365 100644 --- a/init.el +++ b/init.el @@ -22,3 +22,4 @@ (require 'init-python) (require 'init-haskell) (require 'init-rust) +(require 'init-ocaml) diff --git a/lisp/init-bindings.el b/lisp/init-bindings.el index 7811ffe..1155532 100644 --- a/lisp/init-bindings.el +++ b/lisp/init-bindings.el @@ -14,4 +14,6 @@ (global-set-key (kbd "s-k") #'kill-current-buffer) (global-set-key (kbd "C-c q r") #'restart-emacs) +(global-set-key (kbd "C-c C-c") #'compile) + (provide 'init-bindings) diff --git a/lisp/init-ocaml.el b/lisp/init-ocaml.el new file mode 100644 index 0000000..c425c2d --- /dev/null +++ b/lisp/init-ocaml.el @@ -0,0 +1,16 @@ +;; -*- lexical-binding: t; -*- + + +(use-package tuareg + :ensure t + :mode (("\\.ocamlinit\\'" . tuareg-mode))) + + +(use-package ocaml-eglot + :ensure t + :after tuareg + :hook + (tuareg-mode . ocaml-eglot) + (ocaml-eglot . eglot-ensure)) + +(provide 'init-ocaml)