mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -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!))
|
||||
|
Reference in New Issue
Block a user