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

multiline typed ES6 method heads break syntax highlighting #239

Open
schumannd opened this issue Oct 10, 2019 · 2 comments
Open

multiline typed ES6 method heads break syntax highlighting #239

schumannd opened this issue Oct 10, 2019 · 2 comments

Comments

@schumannd
Copy link

schumannd commented Oct 10, 2019

Whenever my arguments get too long for my max line length and i spread them out, naomi syntax highlighting breaks

// Works
funcA = async (arg1: string, arg2: string): Promise<boolean> => {};


// Doesn't work
funcA = async (
  arg1: string,
  arg2: string): Promise<boolean> => {};

The code below the function also gets highlighted incorrectly afterwards, depending on what (valid) js code the function contains.

Are there any other syntaxhighlighters that handle ES6 + typing (i.e. flowtype)? For now naomi seems to do the best job, so thanks for that!!

@TomasBarry
Copy link
Contributor

Have also experienced this. Would be really nice to get a fix for it.

@borela
Copy link
Owner

borela commented Oct 13, 2019

Unfortunately this is a limitation in sublime's regex system, it only works on a line by line basis :c Some solutions have been proposed to the sublime dev's sublimehq/sublime_text#2241

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