refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their respective modes' config blocks, or nearby, to be consistent with how other, similar tools (like lsp!) are initialized, and does so at runtime, rather than at expansion/compile time, which eval-when! caused.
This commit is contained in:
parent
26b8383cbd
commit
a70e634ebd
22 changed files with 81 additions and 96 deletions
|
@ -48,6 +48,9 @@
|
|||
'lsp-mode))
|
||||
(add-hook 'rustic-mode-local-vars-hook #'rustic-setup-lsp 'append))
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(add-hook 'rustic-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
;; HACK If lsp/eglot isn't available, it attempts to install lsp-mode via
|
||||
;; package.el. Doom manages its own dependencies through straight so disable
|
||||
;; this behavior to avoid package-not-initialized errors.
|
||||
|
@ -81,7 +84,3 @@
|
|||
(set-lookup-handlers! 'rustic-mode
|
||||
:definition '(racer-find-definition :async t)
|
||||
:documentation '+rust-racer-lookup-documentation))
|
||||
|
||||
;; Tree sitter
|
||||
(eval-when! (featurep! +tree-sitter)
|
||||
(add-hook! 'rustic-mode-local-vars-hook #'tree-sitter!))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue