Giter Site home page Giter Site logo

Astro Support about rainbow-delimiters.nvim HOT 8 CLOSED

hiphish avatar hiphish commented on August 25, 2024
Astro Support

from rainbow-delimiters.nvim.

Comments (8)

HiPhish avatar HiPhish commented on August 25, 2024 2

Try the current master branch.

from rainbow-delimiters.nvim.

HiPhish avatar HiPhish commented on August 25, 2024 1

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

from rainbow-delimiters.nvim.

davelongdev avatar davelongdev commented on August 25, 2024 1

i meant this astro - https://astro.build/

thanks for the info! i'm looking over the docs and your response now.

from rainbow-delimiters.nvim.

davelongdev avatar davelongdev commented on August 25, 2024 1

seems to be working now! thanks so much.

from rainbow-delimiters.nvim.

davelongdev avatar davelongdev commented on August 25, 2024

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?

from rainbow-delimiters.nvim.

HiPhish avatar HiPhish commented on August 25, 2024

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.

from rainbow-delimiters.nvim.

davelongdev avatar davelongdev commented on August 25, 2024

thanks. this one might be a good starting point.

https://github.com/davelongdev/sample-astro-files/blob/main/astro-test.astro

from rainbow-delimiters.nvim.

davelongdev avatar davelongdev commented on August 25, 2024

this might be helpful.

https://github.com/virchau13/tree-sitter-astro

from rainbow-delimiters.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.