dotfiles-emacs/.emacs.d/config/rust.el
finga ce1a062606 lsp-mode: Move rust-mode config for lsp-mode to rust config
To decouple rust from the dev config and contain it solely in the rust
config, configure the lsp-mode for rust in the rust config.
2024-09-12 10:44:27 +02:00

20 lines
385 B
EmacsLisp

(use-package cargo
:ensure t
:hook
;; enable cargo keybindings
(rust-mode . cargo-minor-mode))
(use-package rust-mode
:ensure t
:config
;; format code when saving
(setq rust-format-on-save t))
(use-package lsp-mode
:ensure t
:hook
(rust-mode . lsp-deferred)
(toml-mode . lsp-deferred))
(use-package flycheck-rust :ensure t)
(use-package toml-mode :ensure t)