gleam-lang / tree-sitter-gleam

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

use `function` node as a locals scope rather than `function_body` #26

Closed the-mikedavis closed 2 years ago

the-mikedavis commented 2 years ago

closes #25

Parameters live outside of the function_body, so if you have a function parameter that matches a module name, it will highlight the module as a @variable.parameter for the rest of the document instead of just the body of the function. As a fix we can set function as a scope instead, so function names, parameters, and body all live under one scope.