diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-07-04 10:15:22 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-07-04 10:15:22 -0700 |
| commit | c9abf4badcfe02a189e5f174f7ff31ee0c5fc5ec (patch) | |
| tree | cf86fe8a9c4c904fe559d9f28c1567e9c63598c0 /emacs/init.el | |
| parent | 5a7627eccaea6389def66a5e87a36664ff43986f (diff) | |
neocaml -> tuareg
Diffstat (limited to 'emacs/init.el')
| -rw-r--r-- | emacs/init.el | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/emacs/init.el b/emacs/init.el index 4ff7fa0..3c68131 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -580,35 +580,22 @@ given keymap or in the global keymap." :custom (haskell-tags-on-save t) (haskell-process-type 'cabal-repl) - :hook - (haskell-mode . interactive-haskell-mode)) -;; (use-package ocaml-ts-mode) -(use-package neocaml - :vc (:url "https://github.com/bbatsov/neocaml" :rev :newest) - ;; teach Eglot about neocaml - (add-to-list 'eglot-server-programs '((neocaml-mode :language-id "ocaml") . ("ocamllsp")))) + :hook (haskell-mode . interactive-haskell-mode)) +(use-package opam-switch-mode + :config (opam-switch-set-switch "default")) +(use-package tuareg + :after opam-switch-mode) (use-package ocp-indent - :after neocaml - :hook (neocaml-mode . ocp-setup-indent)) -(let ((opam-share (ignore-errors (car (process-lines "opam" "var" "share"))))) - (when (and opam-share (file-directory-p opam-share)) - ;; Register Merlin - (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share)) - (autoload 'merlin-mode "merlin" nil t nil) - ;; Automatically start it in OCaml buffers - (add-hook 'neocaml-mode-hook 'merlin-mode t) - ;; Use opam switch to lookup ocamlmerlin binary - (setq merlin-command 'opam) - ;; To easily change opam switches within a given Emacs session, you can - ;; install the minor mode https://github.com/ProofGeneral/opam-switch-mode - ;; and use one of its "OPSW" menus. - )) + :after tuareg + :hook (tuareg-mode . ocp-setup-indent)) +(use-package merlin + :after tuareg + :hook (tuareg-mode . merlin-mode) + :custom (merlin-command 'opam)) (use-package racket-mode) (use-package rustic - :custom - (rustic-lsp-setup-p nil)) -(progn ; elisp - (keymap-set emacs-lisp-mode-map "C-c r" 'raise-sexp)) + :custom (rustic-lsp-setup-p nil)) + (use-package compile :custom @@ -881,7 +868,8 @@ changes." lisp-interaction-mode LaTeX-mode TeX-mode rust-mode - rustic-mode) + rustic-mode + tuareg-mode) "Modes in which to indent regions that are yanked (or yank-popped).") (defun yank-advised-indent-function (beg end) @@ -963,6 +951,7 @@ BEG and END define the region." (global-set-key (kbd "M-c") 'calc) (global-set-key (kbd "M-U") 'scroll-lock-mode) (global-set-key (kbd "M-Q") 'auto-fill-mode) +(global-set-key (kbd "C-c r") 'raise-sexp) (global-set-key (kbd "C-x w o") 'my/toggle-window-other-reachability) (advice-add 'mode-line-window-control :around |
