From f74dd1cd87987ea7faf0cfc6240c2284ef9133cb Mon Sep 17 00:00:00 2001 From: brotzeit Date: Tue, 27 Dec 2022 19:16:44 +0100 Subject: provide alternative rust-mode that derives from rust-ts-mode --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 01dc5e8..217b990 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ - [Clippy](#clippy) - [Easy insertion of dbg!](#easy-insertion-of-dbg) - [More commands](#more-commands) - - [highlighting with tree-sitter](#highlighting-with-tree-sitter) + - [tree-sitter](#tree-sitter) - [LSP](#lsp) - [eglot](#eglot) - [lsp-mode](#lsp-mode) @@ -191,9 +191,20 @@ This is bound to C-c C-d by default. - `rust-toggle-mutability` toggle mut for var defined at current line -## highlighting with tree-sitter +## tree-sitter -You should take a look at [tree-sitter](https://github.com/emacs-tree-sitter/elisp-tree-sitter). When the dependencies are installed you can activate the feature with: +You can try the new native treesitter mode `rust-ts-mode` with: + +```elisp +(use-package rust-mode + :init + (setq rust-mode-treesitter-derive t)) +``` + +In case you want to use treesitter but can't use emacs master, you can +take a look at +[tree-sitter](https://github.com/emacs-tree-sitter/elisp-tree-sitter). When +the dependencies are installed you can activate the feature with: ```elisp (use-package tree-sitter -- cgit v1.2.3