feat(tree-sitter): ts-langs eagar loads on daemon
as ts-langs is quite heavy it makes sense to eagar load it when in daemon mode to make the experience smoother overall
This commit is contained in:
parent
4eeb45f80b
commit
3fdd688356
1 changed files with 5 additions and 2 deletions
|
@ -9,7 +9,11 @@
|
||||||
;; 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))
|
||||||
|
|
||||||
(add-hook! 'tree-sitter-after-on-hook (require 'tree-sitter-langs))
|
(if (daemonp) ;; eager load when in daemon as its start time is easily consumed
|
||||||
|
(require 'tree-sitter-langs)
|
||||||
|
(add-hook! 'tree-sitter-after-on-hook
|
||||||
|
(require 'tree-sitter-langs)))
|
||||||
|
|
||||||
|
|
||||||
(when (featurep! :editor evil +everywhere)
|
(when (featurep! :editor evil +everywhere)
|
||||||
(use-package! evil-textobj-tree-sitter
|
(use-package! evil-textobj-tree-sitter
|
||||||
|
@ -32,4 +36,3 @@
|
||||||
|
|
||||||
: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"))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue