Create initial rust development setup
Alan Pearce alan@alanpearce.eu
Thu, 06 May 2021 16:05:42 +0200
4 files changed, 23 insertions(+), 1 deletions(-)
M user/emacs/init.el → user/emacs/init.el
@@ -719,6 +719,14 @@ (if (not (string-match-p "go" compile-command)) (set (make-local-variable 'compile-command) "go build -v && go test && go vet")))))) +;;;; rust +(use-package rustic + :config (progn + (setq rustic-format-on-save t + lsp-rust-analyzer-display-inlay-hints t + lsp-rust-analyzer-cargo-watch-command "clippy") + (add-to-list 'flycheck-checkers 'rustic-clippy))) + ;;;; js (setq js-indent-level 2 js-enabled-frameworks '(javascript)) @@ -925,7 +933,8 @@ :config (progn (setq lsp-auto-guess-root t lsp-auto-configure nil lsp-idle-delay 0.5 - lsp-enable-symbol-highlighting nil) + lsp-enable-symbol-highlighting nil + lsp-eldoc-render-all t) (add-to-list 'lsp-language-id-configuration '(js-mode . "javascript")))) (use-package lsp-javascript
M user/prefect.nix → user/prefect.nix
@@ -10,6 +10,7 @@ ./settings/development/base.nix ./settings/development/clojure.nix ./settings/development/lisp.nix ./settings/development/javascript.nix + ./settings/development/rust.nix ./settings/development/web.nix ./settings/gaming.nix ./settings/git.nix
A user/settings/development/rust.nix
@@ -0,0 +1,11 @@+{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ + cargo + rustc + rustfmt + rust-analyzer + clippy + ]; +}
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -166,6 +166,7 @@ rainbow-mode restclient ripgrep rjsx-mode + rustic scss-mode spacemacs-theme swiper