mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
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.
42 lines
775 B
EmacsLisp
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
|