Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help to contribute injection #103

Open
ignamartinoli opened this issue Jul 29, 2024 · 0 comments
Open

Need help to contribute injection #103

ignamartinoli opened this issue Jul 29, 2024 · 0 comments

Comments

@ignamartinoli
Copy link

Hi, I would like to contribute with an injection for Hyperscript.

It is an embedded language that should be put inside the _ tag.

Here is a Treesitter grammar: https://github.com/dz4k/tree-sitter-_hyperscript

I came up with this query to inject it:

((attribute
  (attribute_name) @name
  (quoted_attribute_value
    (attribute_value) @value))
 (#eq? @name "_"))

I would like to open a PR, but I am a bit lost.

After looking at the injection file, I assume that what I should put there is:

((attribute
  (attribute_name) @name
  (quoted_attribute_value
    (attribute_value) @value))
 (#eq? @name "_")
 (#set! injection.language "_hyperscript"))

Am I right? Any feedback is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@ignamartinoli and others