fix(tree-sitter): ensure load order

use-package's :after keyword introduces some load order behavior that
complicates the user's ability to target it with either after! or
with-eval-after-load. Best to avoid it.

Ref: jwiegley/use-package#829
This commit is contained in:
Henrik Lissner 2022-06-18 14:35:13 +02:00
parent 5eed2e9e61
commit 76431f699e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -9,9 +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))
(use-package! evil-textobj-tree-sitter (use-package! evil-textobj-tree-sitter
:when (featurep! :editor evil +everywhere) :when (featurep! :editor evil +everywhere)
:after tree-sitter :defer t
:init (after! tree-sitter (require 'evil-textobj-tree-sitter))
:config :config
(defvar +tree-sitter-inner-text-objects-map (make-sparse-keymap)) (defvar +tree-sitter-inner-text-objects-map (make-sparse-keymap))
(defvar +tree-sitter-outer-text-objects-map (make-sparse-keymap)) (defvar +tree-sitter-outer-text-objects-map (make-sparse-keymap))
@ -58,7 +60,6 @@
"v" (+tree-sitter-goto-textobj "conditional.outer") "v" (+tree-sitter-goto-textobj "conditional.outer")
"l" (+tree-sitter-goto-textobj "loop.outer"))) "l" (+tree-sitter-goto-textobj "loop.outer")))
(after! which-key (after! which-key
(setq which-key-allow-multiple-replacements t) (setq which-key-allow-multiple-replacements t)
(pushnew! (pushnew!