diff options
author | Aspen Smith <root@gws.fyi> | 2024-03-11T01·53-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-03-11T01·58+0000 |
commit | a0225431de659ce49108a92eed602e997eaf4bcd (patch) | |
tree | 17f2165093f01203c27dedb8e3a79b78fd830973 /users/aspen/emacs/config.org | |
parent | 58379302f4f328d16dfb8ed3b01bf2b3a045143b (diff) |
feat(aspen/emacs): Some more rust bindings r/7675
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>
Diffstat (limited to 'users/aspen/emacs/config.org')
-rw-r--r-- | users/aspen/emacs/config.org | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/users/aspen/emacs/config.org b/users/aspen/emacs/config.org index 65b705370747..0d747c0369f9 100644 --- a/users/aspen/emacs/config.org +++ b/users/aspen/emacs/config.org @@ -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 |