Skip to content

Need help to contribute injection #103

Open
@ignamartinoli

Description

@ignamartinoli

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions