docs(emacs/programming): set treesitter for Rust modes

This commit is contained in:
Lucien Cartier-Tilet 2025-03-02 14:18:08 +01:00
parent 6b379bfaf8
commit 316aabe413
Signed by: phundrak
GPG Key ID: 347803E8073EACE0

View File

@ -1278,8 +1278,19 @@ Finally, Im using [[https://github.com/microsoft/pyright][Pyright]] as my LSP
*** Rust *** Rust
Rust is a general programming language, akin to C++ in some ways, but Rust is a general programming language, akin to C++ in some ways, but
much more oriented towards safe code, and much better suited for web much more oriented towards safe code, and much better suited for web
development. First, lets install the most important package, development.
~rustic~.
First, Im using =rust-mode= to tell it to use [[https://tree-sitter.github.io/tree-sitter/][tree sitter]].
#+begin_src emacs-lisp
(use-package rust-mode
:straight
:defer t
:init
(setq rust-mode-treesitter-derive t))
#+end_src
Then, lets install the most important package, =rustic=, which provides
several improvements on top of =rust-mode=.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package rustic (use-package rustic
:defer t :defer t