fix(tree-sitter): lazy load tree-sitter-langs

Some how for some reason tree-sitter-langs managed to load. If if put
its require in the block of a lazy loaded package. it would load.
If i were to set its use-package call to load it after a lazy loaded
package. it would load.

a hook (and disabling it) were the only reliable ways to get it to lazy
load
This commit is contained in:
Jeetaditya Chatterjee 2021-10-07 00:37:30 +01:00
parent 4552064a5a
commit 4eeb45f80b
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91

View file

@ -9,8 +9,7 @@
;; and this highlights the entire sub tree in your code ;; and this highlights the entire sub tree in your code
tree-sitter-debug-highlight-jump-region t)) tree-sitter-debug-highlight-jump-region t))
(use-package! tree-sitter-langs (add-hook! 'tree-sitter-after-on-hook (require 'tree-sitter-langs))
:after tree-sitter)
(when (featurep! :editor evil +everywhere) (when (featurep! :editor evil +everywhere)
(use-package! evil-textobj-tree-sitter (use-package! evil-textobj-tree-sitter
@ -33,3 +32,4 @@
:textobj "l" nil nil :textobj "l" nil nil
:textobj "l" (evil-textobj-tree-sitter-get-textobj "loop.inner") (evil-textobj-tree-sitter-get-textobj "loop.outer")))) :textobj "l" (evil-textobj-tree-sitter-get-textobj "loop.inner") (evil-textobj-tree-sitter-get-textobj "loop.outer"))))