gleam-lang / tree-sitter-gleam

🌳 A tree-sitter grammar for the Gleam programming language
Apache License 2.0
78 stars 15 forks source link

[bug] tree-sitter incorrectly labels comment inside function body as (function_body) #98

Closed Juhan280 closed 2 months ago

Juhan280 commented 2 months ago

Screenshot_20240907-115103_Termux

The code used in the example:

fn name() -> Nil { 
    // comment

    Nil

    // comment

    Nil

    // comment
}
the-mikedavis commented 2 months ago

This may be a bug in neovim instead of here. Using :tree-sitter-subtree on this example with Helix:

gleam

Juhan280 commented 2 months ago

Yeah, it might be. If i do (comment) @c, it still captures that comment despite it being labeled as (function_body)