feat(aspen/emacs): Some more rust bindings

Change-Id: Iabdd9f75438e83e73c7e423a3646d72b9bbe5b83
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11129
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
This commit is contained in:
Aspen Smith 2024-03-10 21:53:47 -04:00 committed by clbot
parent 58379302f4
commit a0225431de

View file

@ -1053,28 +1053,40 @@ nil
#+RESULTS:
** rust
*** Config
#+begin_src elisp
#+begin_src elisp :tangle yes
(defun aspen/rust-setup ()
(interactive)
(+evil-embrace-angle-bracket-modes-hook-h)
(setq-local whitespace-line-column 100
fill-column 100)
(eglot-inlay-hints-mode -1)
(setq lsp-rust-analyzer-cargo-watch-command "clippy"
lsp-rust-analyzer-cargo-watch-args ["--target-dir" "/home/grfn/code/readyset/readyset/target/rust-analyzer"]
rustic-format-trigger 'on-save
))
lsp-ui-doc-enable t))
(add-hook 'rust-mode-hook #'aspen/rust-setup)
#+end_src
#+RESULTS:
| doom-modeline-env-setup-rust | aspen/rust-setup |
| aspen/rust-setup | grfn/rust-setup | doom-modeline-env-setup-rust |
*** Bindings
#+begin_src elisp :tangle yes
(map!
(:map rust-mode-map
:n "g RET" #'lsp-rust-analyzer-run
:n "g R" #'lsp-find-references
:n "g d" #'lsp-find-definition
:n "g Y" #'lsp-goto-type-definition
(:localleader
"m" #'lsp-rust-analyzer-expand-macro)))
#+end_src
#+RESULTS:
*** Theme overrides
#+begin_src elisp
#+begin_src elisp :tangle yes
(custom-set-faces!
`(rust-unsafe :foreground ,+solarized-red))
#+end_src