language/nix: add treesitter queries for nvf idioms - #781
Draft
horriblename wants to merge 3 commits into
Draft
Conversation
horriblename
force-pushed
the
nvf-inject
branch
from
April 19, 2025 19:26
f084b74 to
ea8c7ef
Compare
horriblename
force-pushed
the
nvf-inject
branch
from
April 19, 2025 20:14
ea8c7ef to
53ad1b2
Compare
Collaborator
|
this brings back up the discussion whether we include queries in nvf or not. If it were me, I would prefer having an API like examples: {
cfg.gotmpl.injection = "html";
vim.queries.gotmpl.injections = mkSCMInline ''
;; extends
((text) @injection.content
(#set! injection.language "${cfg.gotmpl.injection}")
(#set! injection.combined)
)
'';
}{
cfg.tera.injection = "markdown";
vim.queries.gotmpl.injections = mkSCMInline ''
;; extends
((content) @injection.content
(#set! injection.language "${cfg.tera.injection}")
(#set! injection.combined)
)
'';
} |
Owner
|
What would be the purpose of |
Collaborator
was just a thinking. then just make it a string, and when adding it, add lua and scm injections to NVF so I dont have to add lang comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
todo: unsure if the current approach works robustly - our query has the same level of priority as nvim-treesitter in terms of rtp ordering, does this guarantee that ours will be loaded along with nvim-ts's or do we need to prepend ours in rtp?