Skip to content

Commit

Permalink
fix: rust-mode is overrided by rust-ts-mode (global-treesit-auto-mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Jul 2, 2024
1 parent ff6cd13 commit 2996e84
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lisp/init-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@

;; Rust
(use-package rust-mode
:mode ("\\.rs\\'" . rustic-mode)
:init (setq rust-format-on-save t
rust-mode-treesitter-derive t))
rust-mode-treesitter-derive t)
:config
;; HACK: `global-treesit-auto-mode' will override `rust-mode'.
(define-derived-mode rustic-mode rust-mode "Rust"
"Major mode for Rust code.
\\{rust-mode-map}"))

(use-package ron-mode
:mode ("\\.ron" . ron-mode))
Expand Down

0 comments on commit 2996e84

Please sign in to comment.