Files
.emacs.d/modules/languages/siren-rust.el
Jim Myhrberg 4ea4f6dc95 chore(completion): remove needless company-mode references
Since we enable global-company-mode, explicitly enabling it in the setup
for various major modes does nothing. But it does tie the code to
company mode, making it harder to try alternatives like corfu.
2022-03-14 11:58:47 +00:00

42 lines
775 B
EmacsLisp

;;; siren-rust.el --- jimeh's Emacs Siren: rust-mode configuration.
;;; Commentary:
;; Basic configuration for rust-mode.
;;; Code:
(require 'siren-folding)
(require 'siren-lsp)
(use-package rust-mode
:mode "\\.rs\\'"
:interpreter "rust"
:commands rust-mode
:bind (:map rust-mode-map
("RET" . newline-and-indent))
:hook
(rust-mode . siren-rust-mode-setup)
:init
(defun siren-rust-mode-setup ()
(setq rust-format-on-save t)
(lsp-deferred)
(siren-folding)
(subword-mode +1)))
(use-package cargo
:hook (rust-mode . cargo-minor-mode))
(use-package flycheck-rust
:after rust-mode
:hook (flycheck-mode . flycheck-rust-setup))
(use-package rust-playground
:defer t)
(provide 'siren-rust)
;;; siren-rust.el ends here