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

Function name sometimes not highlighted #25

Closed
lpil opened this issue May 17, 2022 · 1 comment · Fixed by #26
Closed

Function name sometimes not highlighted #25

lpil opened this issue May 17, 2022 · 1 comment · Fixed by #26

Comments

@lpil
Copy link
Member

lpil commented May 17, 2022

Hello! I found an instance in which a function name does not get highlighted. It's not clear to me why this is right away

image

https://github.com/gleam-lang/stdlib/blob/f9d57db847ff2a8471c9136bd309c870b610d04d/src/gleam/uri.gleam#L325

@the-mikedavis
Copy link
Member

It looks like the scopes for locals may not be correct for function parameters: if string is captured as a @variable.parameter earlier in the document it will throw off the highlights later:

Should be a small fix I think.

@J3RN J3RN closed this as completed in #26 May 17, 2022
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 19, 2022
The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 24, 2022
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also gleam-lang/tree-sitter-gleam#29
archseer pushed a commit to helix-editor/helix that referenced this issue May 25, 2022
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also gleam-lang/tree-sitter-gleam#29
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also gleam-lang/tree-sitter-gleam#29
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also gleam-lang/tree-sitter-gleam#25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also gleam-lang/tree-sitter-gleam#14 (comment)

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also gleam-lang/tree-sitter-gleam#29
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

Successfully merging a pull request may close this issue.

2 participants