1
0
Fork 0

feat(emacs): add rust and ocaml configs

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2023-12-29 04:43:28 -05:00
parent 8ac7f4a5ae
commit 1d323ff80c
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47
3 changed files with 22 additions and 17 deletions

View file

@ -56,7 +56,9 @@
racket.el,
latexconfig.el,
cppconfig.el,
pdfconfig.el
pdfconfig.el,
rustconfig.el,
ocamlconfig.el
]
];
.config/picom.conf;

View file

@ -62,17 +62,6 @@
(global-set-key (kbd "C-c g b") #'magit-blame)
(setq auth-sources '("~/.authinfo"))
;; Web configuration
(add-to-list 'auto-mode-alist '("\\.jsx?$" . web-mode))
(setq web-mode-content-types-alist '(("jsx" . "\\.js[x]?\\")))
(setq web-mode-markup-indent-offset 2)
;; Rust LSP configuration
(setq lsp-rust-analyzer-cargo-watch-enable t)
(setq lsp-rust-analyzer-cargo-watch-command "clippy")
(setq lsp-rust-analyzer-server-display-inlay-hints t)
(setq lsp-rust-analyzer-inlay-hints-mode t)
;; Neotree
(defun neotree-toggle-current-directory ()
"Toggle neotree at the current directory."

View file

@ -80,6 +80,15 @@
(straight-use-package 'slime)
(straight-use-package 'haskell-mode)
(straight-use-package 'lsp-haskell)
(straight-use-package 'company-coq)
(straight-use-package 'proof-general)
(straight-use-package 'tuareg)
(straight-use-package 'utop)
(straight-use-package 'dune)
(straight-use-package 'flycheck-ocaml)
(straight-use-package 'merlin-eldoc)
(straight-use-package 'ocamlformat)
;; ====== Custom =============================
@ -97,6 +106,8 @@
(load-library "cppconfig")
(load-library "pdfconfig")
(load-library "gpgconfig")
(load-library "rustconfig")
(load-library "ocamlconfig")
;; ====== Hooks ==============================
(add-hook 'after-init-hook 'global-company-mode)
@ -115,13 +126,16 @@
(add-hook 'python-mode-hook #'lsp)
(add-hook 'go-mode-hook #'lsp)
(add-hook 'tuareg-mode-hook #'lsp)
(add-hook 'haskell-mode-hook #'lsp)
(add-hook 'emacs-lisp-mode-hook #'paredit-mode)
(add-hook 'scheme-mode-hook #'paredit-mode)
(add-hook 'racket-mode-hook #'paredit-mode)
(add-hook 'clojure-mode-hook #'paredit-mode)
(add-hook 'lisp-mode-hook #'paredit-mode)
(add-hook 'emacs-lisp-mode-hook #'paredit-mode)
(add-hook 'scheme-mode-hook #'paredit-mode)
(add-hook 'racket-mode-hook #'paredit-mode)
(add-hook 'clojure-mode-hook #'paredit-mode)
(add-hook 'lisp-mode-hook #'paredit-mode)
(add-hook 'racket-repl-mode-hook #'paredit-mode)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(add-hook 'lsp-mode-hook 'lsp-inlay-hints-mode)
(add-hook 'racket-mode-hook 'racket-xp-mode)