Rework OCaml setup, and move to emacs-plus homebrew
All checks were successful
/ Test config on 20 (push) Successful in 31s
All checks were successful
/ Test config on 20 (push) Successful in 31s
This commit is contained in:
parent
9dd86c7fc2
commit
0c09dcf198
6 changed files with 91 additions and 67 deletions
|
|
@ -50,6 +50,9 @@
|
|||
(define-key icejam-keys-mode-map [(hyper l)] #'goto-line) ;; Goto Line
|
||||
;; Disable meta on right alt (useful for Polish characters)
|
||||
;; (setq mac-right-option-modifier nil)
|
||||
|
||||
;; Allow for fullscreen frames without gaps
|
||||
(setq frame-resize-pixelwise t)
|
||||
))
|
||||
|
||||
(defun icejam-switch-right-left-alt ()
|
||||
|
|
|
|||
16
lisp/icejam-testing.el
Normal file
16
lisp/icejam-testing.el
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
;;; icejam-testing.el --- summary
|
||||
|
||||
;; Author: Maciej Szlosarczyk
|
||||
;; Maintainer: Maciej Szlosarczyk
|
||||
;; Version: 0.1-snapshot
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; icejam-testing includes required things for writing tests.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package buttercup :straight t)
|
||||
|
||||
(provide 'icejam-testing)
|
||||
;;; icejam-testing.el ends here
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
:config
|
||||
(add-to-list 'treesit-extra-load-path (tree-sitter-langs--bin-dir)))
|
||||
|
||||
(use-package tree-sitter-indent :straight t)
|
||||
;; (use-package tree-sitter-indent :straight t)
|
||||
(add-hook 'tree-sitter-after-on-hook 'tree-sitter-hl-mode)
|
||||
|
||||
(provide 'icejam-tree-sitter)
|
||||
|
|
|
|||
|
|
@ -3,40 +3,31 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'icejam-transient)
|
||||
(require 'icejam-prog-mode)
|
||||
(declare-function lsp "lsp-mode" nil)
|
||||
|
||||
(use-package merlin :defer t :straight t)
|
||||
(use-package opam-switch-mode :straight t :defer t)
|
||||
(use-package dune :defer t :straight t)
|
||||
(use-package tuareg
|
||||
:defer t
|
||||
:straight t
|
||||
:config
|
||||
(add-hook 'tuareg-mode-hook 'merlin-mode))
|
||||
:config (add-hook 'tuareg-mode-hook 'merlin-mode))
|
||||
|
||||
(use-package merlin
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
(use-package reason-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:config (setq refmt-command 'opam))
|
||||
|
||||
(use-package dune
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
(transient-define-prefix icejam-lang-ocaml/context-menu ()
|
||||
(transient-define-prefix icejam/ocaml-lang-menu ()
|
||||
"Ocaml Actions."
|
||||
["OCaml actions"
|
||||
[""
|
||||
("r" "Reload" icejam-revert-buffer-no-confirm)
|
||||
("i" "Indent" icejam-mark-and-indent-whole-buffer)]
|
||||
[""
|
||||
("f" "Format" ocamlformat)
|
||||
("e" "Opam Env" tuareg-opam-update-env)]]
|
||||
("f" "Format" lsp-format-buffer)
|
||||
("e" "Errors" flycheck-list-errors)
|
||||
("o" "Opam Env" opam-switch-set-switch)]]
|
||||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(add-to-list
|
||||
'icejam-language-transient-alist '(elixir-ts-mode . icejam/elixir-lang-menu))
|
||||
(add-to-list 'icejam-language-transient-alist '(tuareg-mode . icejam/ocaml-lang-menu))
|
||||
|
||||
(defun icejam/load-ocaml-site-packages ()
|
||||
"Generate ocaml config."
|
||||
|
|
@ -45,7 +36,6 @@
|
|||
;; Register Merlin
|
||||
(add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share))
|
||||
(autoload 'merlin-mode "merlin" nil t nil)
|
||||
(autoload 'ocamlformat "ocamlformat" nil t nil)
|
||||
(autoload 'utop "utop" nil t nil)
|
||||
(autoload 'dune "dune" nil t nil)
|
||||
|
||||
|
|
@ -53,8 +43,16 @@
|
|||
(setq merlin-command 'opam))))
|
||||
|
||||
;; OCaml setup
|
||||
(add-hook 'tuareg-mode-hook 'merlin-mode)
|
||||
(add-hook 'tuareg-mode-hook 'icejam/load-ocaml-site-packages)
|
||||
(defun icejam/activate-tuareg-mode ()
|
||||
"All thing OCaml."
|
||||
(icejam/set-indent 2)
|
||||
(opam-switch-mode t)
|
||||
(icejam/load-ocaml-site-packages)
|
||||
(lsp))
|
||||
|
||||
(add-hook 'tuareg-mode-hook 'icejam/activate-tuareg-mode)
|
||||
|
||||
;; Disable merlin keys that are unused by me
|
||||
(add-hook 'merlin-mode-hook (lambda ()
|
||||
(unbind-key "C-c C-d" merlin-mode-map)
|
||||
(unbind-key "C-c C-l" merlin-mode-map)
|
||||
|
|
@ -68,30 +66,30 @@
|
|||
;; Use tuareg-opam with lock files
|
||||
(add-to-list 'auto-mode-alist '("\\.opam.locked\\'" . tuareg-opam-mode))
|
||||
|
||||
(transient-define-prefix icejam-lang/reasonml-context-menu ()
|
||||
"ReasonML Actions."
|
||||
["ReasonML actions"
|
||||
[""
|
||||
("r" "Reload" icejam-revert-buffer-no-confirm)
|
||||
("i" "Indent" icejam-mark-and-indent-whole-buffer)]
|
||||
[""
|
||||
("f" "Format" refmt)
|
||||
("e" "Opam Env" tuareg-opam-update-env)]]
|
||||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
;; (transient-define-prefix icejam-lang/reasonml-context-menu ()
|
||||
;; "ReasonML Actions."
|
||||
;; ["ReasonML actions"
|
||||
;; [""
|
||||
;; ("r" "Reload" icejam-revert-buffer-no-confirm)
|
||||
;; ("i" "Indent" icejam-mark-and-indent-whole-buffer)]
|
||||
;; [""
|
||||
;; ("f" "Format" refmt)
|
||||
;; ("e" "Opam Env" opam-switch-set-switch)]]
|
||||
;; [""
|
||||
;; ("q" "Quit" keyboard-quit)])
|
||||
|
||||
|
||||
(defun icejam-lang/activate-reason-mode ()
|
||||
"Generate reason config."
|
||||
(define-key
|
||||
reason-mode-map (kbd "C-c l") 'icejam-lang/reasonml-context-menu))
|
||||
;; (defun icejam-lang/activate-reason-mode ()
|
||||
;; "Generate reason config."
|
||||
;; (define-key
|
||||
;; reason-mode-map (kbd "C-c l") 'icejam-lang/reasonml-context-menu))
|
||||
|
||||
;; Reason setup
|
||||
(add-hook 'reason-mode-hook
|
||||
(lambda ()
|
||||
(add-hook 'before-save-hook #'refmt-before-save)))
|
||||
(add-hook 'reason-mode-hook 'icejam-lang/activate-reason-mode)
|
||||
(add-hook 'reason-mode-hook 'merlin-mode)
|
||||
;; ;; Reason setup
|
||||
;; (add-hook 'reason-mode-hook
|
||||
;; (lambda ()
|
||||
;; (add-hook 'before-save-hook #'refmt-before-save)))
|
||||
;; (add-hook 'reason-mode-hook 'icejam-lang/activate-reason-mode)
|
||||
;; (add-hook 'reason-mode-hook 'merlin-mode)
|
||||
|
||||
(provide 'icejam-lang-ocaml)
|
||||
;;; icejam-lang-ocaml.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue