mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 19:46:17 +01:00
5ab9980b9d
Signed-off-by: Magic_RB <magic_rb@redalder.org>
991 B
991 B
Tree Sitter
This is an Emacs Lisp binding for tree-sitter, an incremental parsing library. It requires Emacs 25.1 or above, built with dynamic module support.
(use-package tree-sitter
:straight t
:after (tree-sitter-langs)
:config
(global-tree-sitter-mode)
(setq tree-sitter-load-path '("~/.emacs.d/treesitter-grammars")
tree-sitter-major-mode-language-alist
'((haskell-mode . haskell)
(sh-mode . bash)
(emacs-lisp-mode . elisp)
(c++-mode . cpp)
(c-mode . c)
(css-mode . css)
(hcl-mode . hcl)
(json-mode . json)
(nix-mode . nix)
(php-mode . php)
(python-mode . python)
(rustic-mode . rust)))
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))