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
|
@ -67,6 +67,11 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook)
|
||||
:append #'tree-sitter!))
|
||||
|
||||
;; HACK Suppress 'Args out of range' error in when multiple modifications are
|
||||
;; performed at once in a `c++-mode' buffer, e.g. with `iedit' or
|
||||
;; multiple cursors.
|
||||
|
@ -304,9 +309,3 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
|
||||
"-isystem/usr/local/include"]
|
||||
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))
|
||||
|
||||
;; Tree sitter
|
||||
(eval-when! (featurep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook)
|
||||
#'tree-sitter!))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue