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

Incorrect end highlighted for "fun Mod:Name/Arity" #990

Open
gustawlippa opened this issue Sep 6, 2022 · 2 comments · May be fixed by #1002
Open

Incorrect end highlighted for "fun Mod:Name/Arity" #990

gustawlippa opened this issue Sep 6, 2022 · 2 comments · May be fixed by #1002

Comments

@gustawlippa
Copy link

Please see the issue here:
image
This is the correct end for this fun, and it works when the cursor is on it:
image
However, what is worst, when we highlight the end, the wrong fun is highlighted:
image

This is not a huge issue, but may be pretty confusing with nested funs, or different indentation.
I don't know anything about plugin development, so I'm not sure where the issue comes from.

@kvakvs
Copy link
Collaborator

kvakvs commented Jan 3, 2023

The explanation is in the parser output. Parser produces ERL_FUN_EXPRESSION which also contains 'fun' keyword (but shouldn't) then 'fun' will be matched with 'end' keyword by the matching token highlighter. Solution is to not output 'fun' in the token stream, or rename it, if it is recognized as ERL_FUN_EXPRESSION. I will see what can be done about this.

@gustawlippa
Copy link
Author

Great, thanks for the reply, I must admit I even forgot I filed this issue. I would love to help, although I have no idea how, and I'm not familiar with developing IntelliJ plugins.

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