refactor!(tree-sitter): add +tree-sitter flag

BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
This commit is contained in:
Jeetaditya Chatterjee 2021-10-19 01:54:17 +01:00
parent 400d8d4116
commit 06ed5ade3f
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91
18 changed files with 93 additions and 12 deletions

View file

@ -311,3 +311,12 @@ to tide."
(def-project-mode! +javascript-gulp-mode
:when (locate-dominating-file default-directory "gulpfile.js"))
;; Tree sitter
(eval-when! (featurep! +tree-sitter)
(add-hook! '(javascript-mode-hook
js-mode-hook
js2-mode-hook
js3-mode-hook
typescript-mode-hook
rjsx-mode) #'turn-on-tree-sitter-mode))