You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
inline if statement has an 'end' statement linked to it and highlighted making the end statements after it incorrect #656
I am not very familiar with vscode api, but is it possible to get textmate scope name from there? Recently I created PR where each language structure which closes with end keyword has different scope name. with it you can distinguish if modifier from if code block and optional do (like in while true do) from real do bloock #666
In short, this is not the only bug with this feature. It will break if you have a keyword in string, regular expression or even in comment section. And ofcourse it will break not only wtih if modifier, but also with unlesswhile and until modifiers.
Furthermore there are some ambigious cases with modifiers. For example "hello".match /(he)/ if condition and 10 / if rand(0..10) >= 5 then 5 else 2 end
In both cases if goes after / but it is modifier only when it goes after regex. Same thing with %r<re> literal
I am sure its possible to check for all this stuff with just a sequential matching with regexes but it will be quite hard. Strings, regexes and other structures could be multiline and you need to keep track of it while scanning in order to find a correct pair.
Everything I mentioned before has already been solved in #666 . Unfortunately there is no API (microsoft/vscode#580) to get textmate scopes from extensions. So what I did is just parsed file again with new grammar file within this extension and it works fine. I think i fixed all bugs with this feature and now it can correctly highlight start and end of code blocks even in tricky oneliners like this:
I've just encountered this error a couple days ago. I know it's probably a bit anal-retentive on me, but this kind of issue makes me want to not use VS Code for Ruby development altogether. Are there any plans to fix this?
Your environment
vscode-rubyversion:0.27.01.44.2WindowsuseLanguageServeris true in your configuration?)not using language serverExpected behavior
inline if statement isn't highlighted and linked to an end statement
Actual behavior
Here is the code sample: