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

Crash - Syntax Highlighting: 'invalid pattern in look-behind' #3384

Open
bryphe opened this issue Apr 8, 2021 · 2 comments
Open

Crash - Syntax Highlighting: 'invalid pattern in look-behind' #3384

bryphe opened this issue Apr 8, 2021 · 2 comments
Labels
A-syntax-highlighting Area: Syntax Highlighting I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor L-lua Language: Lua

Comments

@bryphe
Copy link
Member

bryphe commented Apr 8, 2021

From discord:

I have the Lua Server from Sumneko installed, after a short while, it tears down Onivim
the crashlog says this: (Failure "invalid pattern in look-behind"):

https://discord.com/channels/417774914645262338/424012160696582144/829645005340540958

sr_Nudge note start to grid function.lua.txt

Repro:

  • Install the Lua Server from Sumneko
  • Navigate to the 3rd line, move cursor over direction
  • Press gh

Expected: Hover should show
Actual: Crashes with "invalid pattern in look-behind"

@bryphe bryphe added A-syntax-highlighting Area: Syntax Highlighting L-lua Language: Lua I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor labels Apr 8, 2021
@bryphe
Copy link
Member Author

bryphe commented Apr 8, 2021

More callstack:

[ERROR] [ 6.993s] Oni2.Exception : Exception (Failure "invalid pattern in look-behind"):
Raised at file "stdlib.ml", line 29, characters 17-33
Called from file "src/reason-textmate/RegExp.re", line 41, characters 20-33
Called from file "src/reason-textmate/RegExpFactory.re", line 114, characters 11-29
Called from file "src/reason-textmate/Pattern.re", line 126, characters 23-68
Called from file "src/reason-textmate/Pattern.re", line 186, characters 28-66
Called from file "src/reason-textmate/Grammar.re", line 88, characters 19-60
Called from file "list.ml", line 121, characters 24-34
Called from file "src/reason-textmate/Grammar.re", line 119, characters 19-57
Called from file "list.ml", line 121, characters 24-34
Called from file "src/reason-textmate/Grammar.re", line 150, characters 6-65
Called from file "src/Syntax/GrammarRepository.re", line 33, characters 15-54
Called from file "src/reason-textmate/GrammarRepository.re" (inlined), line 8, characters 40-57
Called from file "src/reason-textmate/Tokenizer.re", line 22, characters 9-60
Called from file "src/Syntax/TextmateTokenizerJob.re", line 129, characters 6-174
Called from file "src/Core/Job.re", line 69, characters 4-33
Called from file "src/Core/Job.re" (inlined), line 73, characters 31-42
Called from file "src/Core/Job.re", line 96, characters 15-31
...

Pattern:

STR: (?<=---\s*)@class

@bryphe
Copy link
Member Author

bryphe commented Apr 8, 2021

Temporary workaround - you can copy this patched lua syntax over:

https://github.com/onivim/oni2/blob/master/extensions/lua/syntaxes/lua.tmLanguage.json

and then copy it over the syntax that the semneko.lua extension uses, ie:

cp ~/Downloads/lua.tmLanguage.json ~/.config/oni2/extensions/sumneko.lua-1.20.3/syntaxes/lua.tmLanguage.son

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntax-highlighting Area: Syntax Highlighting I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor L-lua Language: Lua
Projects
None yet
Development

No branches or pull requests

1 participant