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

Extra whitespace after fun keyword breaks syntax highlighting #169

Open
freahs opened this issue Nov 25, 2024 · 0 comments
Open

Extra whitespace after fun keyword breaks syntax highlighting #169

freahs opened this issue Nov 25, 2024 · 0 comments

Comments

@freahs
Copy link

freahs commented Nov 25, 2024

When defining an anonymous function only a single whitespace seems to be accepted between the fun keyword and the (paranthesized) parameters. When adding another space or a newline directly after the fun keyword, remaining function definitions in the document will be misidentified as function calls. Beside breaking syntax highlighting this seems to have the effect that when writing a new function definition they are automatically indented.

-module(m).

f1() ->
    fun () -> ok end.
f2() ->
    fun 
        () -> ok
    end.
f3() -> 
    ok.

When activating "Developer: Inspect Editor Tokens and Scopes" in command palette and moving cursor to f3 in the above example, textmate scopes include meta.function-call.erlang and meta.expression.fun.implicit.erlang instead of entity.name.function.definition.erlang.

Extension version is v0.0.46

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

No branches or pull requests

1 participant