diff --git a/config.org b/config.org index 2ccd767..6511956 100644 --- a/config.org +++ b/config.org @@ -461,29 +461,7 @@ of a project, and convey the results to various completion facilities. #+INCLUDE: "config/lsp.org" :minlevel 1 -* Tree Sitter - -Tree sitter is included with emacs, but there are a couple of packages that -make managing tree sitter easier. Mainly with automatically updating, and -using tree sitter versions of major modes, and installing the parsers if -needed. - -#+begin_src emacs-lisp -;; Treesit -(setq treesit-language-source-alist - '((rust "https://github.com/tree-sitter/tree-sitter-rust"))) - -(use-package treesit-auto - :custom - (treesit-auto-install 'prompt) - :config - (treesit-auto-add-to-auto-mode-alist 'all) - (global-treesit-auto-mode)) - -(use-package treesit-fold - :ensure t - :defer t) -#+end_src +#+INCLUDE: "config/treesitter.org" :minlevel 1 * Major Modes diff --git a/config/treesitter.org b/config/treesitter.org new file mode 100644 index 0000000..f051e46 --- /dev/null +++ b/config/treesitter.org @@ -0,0 +1,24 @@ +* Tree Sitter + +Tree sitter is included with emacs, but there are a couple of packages that +make managing tree sitter easier. Mainly with automatically updating, and +using tree sitter versions of major modes, and installing the parsers if +needed. + +#+begin_src emacs-lisp +;; Treesit +(setq treesit-language-source-alist + '((rust "https://github.com/tree-sitter/tree-sitter-rust"))) + +(use-package treesit-auto + :custom + (treesit-auto-install 'prompt) + :config + (treesit-auto-add-to-auto-mode-alist 'all) + (global-treesit-auto-mode)) + +(use-package treesit-fold + :ensure t + :defer t) +#+end_src +