dev, rust: Extract Rust config into separate file

Move configuration regarding Rust into its own file.
This commit is contained in:
finga 2023-11-15 11:27:28 +01:00
parent 941b156a55
commit 1c0930fa65
4 changed files with 15 additions and 13 deletions

View file

@ -22,18 +22,6 @@
:ensure t :ensure t
:bind ("M-s d" . deadgrep)) :bind ("M-s d" . deadgrep))
;; rust
(use-package cargo :ensure t)
(use-package cargo-mode :ensure t)
(use-package rust-mode :ensure t)
(use-package flycheck-rust :ensure t)
;; start cargo
(add-hook 'rust-mode-hook 'cargo-minor-mode)
;; format code when saving
(setq rust-format-on-save t)
;; yaml ;; yaml
(use-package yaml-mode :ensure t) (use-package yaml-mode :ensure t)
(use-package flycheck-yamllint :ensure t) (use-package flycheck-yamllint :ensure t)

13
.emacs.d/config/rust.el Normal file
View file

@ -0,0 +1,13 @@
(use-package cargo
:ensure t
:config
;; enable cargo keybindings
(add-hook 'rust-mode-hook 'cargo-minor-mode))
(use-package rust-mode
:ensure t
:config
;; format code when saving
(setq rust-format-on-save t))
(use-package flycheck-rust :ensure t)

View file

@ -57,7 +57,7 @@ symbols, which are converted to strings, and suffixed with \".el\"."
:group 'config-snippets :group 'config-snippets
:type '(repeat directory)) :type '(repeat directory))
(setq config-snippets '(base backups c calendar dev functions gpg matrix org pass wl)) (setq config-snippets '(base backups c calendar dev functions gpg matrix org pass rust wl))
(message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path) (message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path)
(dolist (snippet config-snippets) (dolist (snippet config-snippets)

View file

@ -9,6 +9,7 @@
!/.emacs.d/config/matrix.el !/.emacs.d/config/matrix.el
!/.emacs.d/config/org.el !/.emacs.d/config/org.el
!/.emacs.d/config/pass.el !/.emacs.d/config/pass.el
!/.emacs.d/config/rust.el
!/.emacs.d/config/tramp.el !/.emacs.d/config/tramp.el
!/.emacs.d/init.el !/.emacs.d/init.el
!/.gitignore.d/emacs !/.gitignore.d/emacs