Closed davelongdev closed 1 year ago
Astro is not supported. I did not even know about the language until just now (I guess you meant this Astro?). Each language needs its own set of queries, so we need to add support for each language individually.
See :h rb-delimiters-query
for information on how to write a new query. For general information on writing queries refer to the Tree-sitter documentation: https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
You can add the query to your own settings, that way you can start using it immediately and experiment before submitting a patch to this plugin. The default query name is rainbow-delimiters
, but you can choose a different name in your settings. For information on query files see the following help topics:
:h 'runtimepath'
:h treesitter-query
:h lua-treesitter-query
i meant this astro - https://astro.build/
thanks for the info! i'm looking over the docs and your response now.
so .astro files are similar to jsx and html, but at least some of them have a frontmatter section (not sure if they all do) - like markdown files. maybe they just need a blank template like the .scm for markdown files?
Ideally yes, we could simply have an empty query and that's it. But this only works if Astro actually does language injection instead of replicating the grammar itself. I need a sample Astro file to try it out. Can you please provide one?
Maybe Astro is similar to Vue (queries/vue/rainbow-delimiters.scm
) in that there are a few surrounding patterns that need to be defined first.
thanks. this one might be a good starting point.
https://github.com/davelongdev/sample-astro-files/blob/main/astro-test.astro
this might be helpful.
Try the current master
branch.
seems to be working now! thanks so much.
Neovim version
0.9.0
Language affected
astro
Query
No response
Strategy
No response
Description