Files
emacs/config/treesitter.org
2025-10-30 14:35:56 -05:00

602 B

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.

;; 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)