From 316aabe413cd4e60f5339a1a60cd12076a998bef Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sun, 2 Mar 2025 14:18:08 +0100 Subject: [PATCH] docs(emacs/programming): set treesitter for Rust modes --- docs/emacs/packages/programming.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/emacs/packages/programming.org b/docs/emacs/packages/programming.org index f6069af..819fbd5 100644 --- a/docs/emacs/packages/programming.org +++ b/docs/emacs/packages/programming.org @@ -1278,8 +1278,19 @@ Finally, I’m using [[https://github.com/microsoft/pyright][Pyright]] as my LSP *** Rust 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 -development. First, let’s install the most important package, -~rustic~. +development. + +First, I’m 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, let’s install the most important package, =rustic=, which provides +several improvements on top of =rust-mode=. #+begin_src emacs-lisp (use-package rustic :defer t