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 highlighting for multiline function type #162

Closed
dansanduleac opened this issue May 22, 2020 · 1 comment
Closed

Incorrect highlighting for multiline function type #162

dansanduleac opened this issue May 22, 2020 · 1 comment

Comments

@dansanduleac
Copy link

Using the brittany formatter puts the :: type on the 2nd line for really long type definitions.

Unfortunately the syntax breaks in that case, it doesn't assign any special textmate scope to the type declaration anymore.

image

If I pull the :: onto the first line, then it works again.

image

@sheaf
Copy link
Collaborator

sheaf commented May 22, 2020

Thanks for the bug report. Unfortunately, to my knowledge this can't be fixed because of the way syntax highlighting works in VS Code (using TextMate grammars), because there's no way to backtrack after looking ahead to a new line. See also issues #27 and #60.

I agree that it's annoying; I personally often end up writing type signatures as in your first screenshot.

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

3 participants