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

Functions with parameters on multiple lines are not highlighted properly. #424

Open
dsantolo opened this issue Mar 20, 2022 · 1 comment

Comments

@dsantolo
Copy link

Functions with lists of parameters that might begin/end on different lines are not highlighted properly. This means that if you also use Prettier with Sublime, it's formatting will cause this issue to occur for functions with lots of parameters.

Here's an example:

Parameter list closing paren on same line as function name:

Screen Shot 2022-03-20 at 7 29 31 PM

After formatting with prettier (closing paren on different line than opening paren):

Screen Shot 2022-03-20 at 7 35 15 PM

In VSCode:

Screen Shot 2022-03-20 at 7 32 37 PM

@Thom1729
Copy link
Contributor

It sounds like the issue is that the name myArrowFunction is not highlighted as a function name, but the function itself is correctly highlighted. If so, this is equivalent to sublimehq/Packages#2267.

I'm tagging as an enhancement because highlighting variables as function names is only sort-of a syntactic distinction and it's being handled on a best-effort basis (currently via single-line lookaheads). I'll probably handle it upstream at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants