refactor(:lang): redo tree-sitter hooks

- bind to major-mode-local-vars-hook instead of major mode hook
- bind the autodef tree-sitter! instead of the functions.
This commit is contained in:
Jeetaditya Chatterjee 2022-04-03 18:00:54 +01:00
parent 7a7565cedf
commit 7f814e5d99
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91
18 changed files with 32 additions and 65 deletions

View file

@ -324,12 +324,9 @@ to tide."
;; Tree sitter
(eval-when! (featurep! +tree-sitter)
(add-hook! '(javascript-mode-hook
js-mode-hook
js2-mode-hook
js3-mode-hook
typescript-mode-hook
typescript-tsx-mode-hook
rjsx-mode-hook)
#'turn-on-tree-sitter-mode
#'+tree-sitter-keys-mode))
(add-hook! '(js-mode-local-vars-hook
js2-mode-local-vars-hook
typescript-mode-local-vars-hook
typescript-tsx-mode-local-vars-hook
rjsx-mode-local-vars-hook)
#'tree-sitter!))