naomi icon indicating copy to clipboard operation
naomi copied to clipboard

multiline typed ES6 method heads break syntax highlighting

Open schumannd opened this issue 6 years ago • 2 comments

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!!

schumannd avatar Oct 10 '19 18:10 schumannd

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

TomasBarry avatar Oct 11 '19 09:10 TomasBarry

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 https://github.com/SublimeTextIssues/Core/issues/2241

borela avatar Oct 13 '19 12:10 borela