├── Type: comment Parent Type: source_file Text: // A comment
...
You can see that the parsing sees the node of type `comment` is there, but the query using `(comment`) doesn't return any captures.
Some of the other queries I have tried work, some do not.
The `(comment)` query is taking from the `.scm` file in the tree sitter queries provided with the helix editor.
Am I doing something wrong, or is this a bug?
Curious, I find now that if I query with (comment) @comment instead of just (comment) it does work. Apparently the tag is required. I'll close this ticket I guess.
I find that queries sometimes work as expected, but sometimes do not. For example in the following code:
========= COMMENTS ========== m1.Captures: []
========= TREE ========== Type: source_file Parent Type: nil Text: package main
import "fmt" // A comment func main() { fmt.Println("Hello, world!") } │ ├── Type: package_clause Parent Type: source_file Text: package main │ ├──── Type: package Parent Type: package_clause Text: package │ ├──── Type: package_identifier Parent Type: package_clause Text: main │ ├── Type: Parent Type: source_file Text:
...
├── Type: comment Parent Type: source_file Text: // A comment
...