File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 88 '((bash " https://github.com/tree-sitter/tree-sitter-bash" )
99 (cmake " https://github.com/uyha/tree-sitter-cmake" )
1010 (css " https://github.com/tree-sitter/tree-sitter-css" )
11+ (dockerfile " https://github.com/camdencheek/tree-sitter-dockerfile" " main" " src" )
1112 (elisp " https://github.com/Wilfred/tree-sitter-elisp" )
1213 (go " https://github.com/tree-sitter/tree-sitter-go" )
1314 (html " https://github.com/tree-sitter/tree-sitter-html" )
2223 (yaml " https://github.com/ikatyang/tree-sitter-yaml" )))
2324
2425
26+ (defvar rb-treesit-grammars-enabled
27+ '(bash dockerfile javascript json python tsx typescript yaml)
28+ " Language ids pointing to `treesit-language-source-alist` for which treesit grammar is enabled."
29+ )
30+
31+ (defun rb/install-treesit-grammars ()
32+ " Install all enabled treesit grammars."
33+ (interactive )
34+ (dolist (grammar rb-treesit-grammars-enabled)
35+ (message " Installing treesit grammar for %s ... " grammar)
36+ (treesit-install-language-grammar grammar))
37+ )
38+
39+
40+
2541(provide 'init-treesit )
2642
2743; ;; init-treesit.el ends here
You can’t perform that action at this time.
0 commit comments