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:
@ -21,6 +21,9 @@
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'ruby-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(add-hook 'ruby-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
(after! inf-ruby
|
||||
(add-hook 'inf-ruby-mode-hook #'doom-mark-buffer-as-real-h)
|
||||
;; switch to inf-ruby from compile if we detect a breakpoint has been hit
|
||||
@ -195,7 +198,3 @@
|
||||
(map! :localleader
|
||||
:map projectile-rails-mode-map
|
||||
"r" #'projectile-rails-command-map))
|
||||
|
||||
;; Tree sitter
|
||||
(eval-when! (featurep! +tree-sitter)
|
||||
(add-hook! 'ruby-mode-local-vars-hook #'tree-sitter!))
|
||||
|
Reference in New Issue
Block a user