Tree-sitter injection not working #13494
-
Hi! I am working with Lilypond files using tree-sitter-lilypond. I have written highlight queries that highlight nearly all of the code, except for the scheme DSL --- which I was hoping to implement through an injection: Here is an image of the highlighting as it stands (notice the scheme code after the For reference here is what I would expect the scheme code to render like (having put it in a scheme file): Now, consider this example: \version "2.24.4"
#(set-global-staff-size 24) who has the following tree:
using the following injection: (embedded_scheme (embedded_scheme_text) @injection.content
(#set! injection.language "scheme")) I would excpect the highlighting to work; but it does not. So, what is wrong in my query? Thanks in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You may need to set |
Beta Was this translation helpful? Give feedback.
You may need to set
(#set! injection.include-children)
since theembedded_scheme_text
node has children nodes underneath it. By default children nodes are excluded from injected text but withinjection.include-children
set the entire node captured with@injection.content
will be re-parsed