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.
Can you use the Developer: Inspect TM Scopes tool to tell me what the detected scopes are for the various use cases (you can find that tool via the command palette).
Also, is this highlighting different than v0.15.0?
#251 was what asked for this kind of highlighting to be put back. The highlighting doesn't really have any "smarts", it just assumes things are various language constructs.
def example
{ a: one.two&.three }
one.two&.three
{ b: one.two&.three || four }
one.two&.three || four
{ c: "".downcase }
{
d: "".downcase
}
one.two['kpp']
end
end
I can't tell for certain that it wasn't the issue in previous versions, but I've noticed it only after 0.17 and I'm using VS Code for some time now, so something have changed in the last version. If you tell me how to rollback to previous version, I can compare.
Ok cool. No, this is good thanks. When you see source.ruby it basically means "I know this is Ruby but no other pattern in the grammar matches this". It appears some of those method calls are being interpreted as variable.other.ruby. This was a change made at the request of those in #251 to make the grammar more optimistic. I'll need to take a look at how the grammar is detecting this code.
There's also varying levels of support across themes. When you say the Light theme works without issue but Solarized does not, it makes me think there are some grammar scopes missing.
I will say the instance of || four is going to be basically impossible to highlight correctly 100% of the time. That circumstance could easily be a variable or a method call and we won't be able to make that determination based on pure regular expressions.
Thank you for your explanation. The problem I see here is that it behaves differently in, at least in my opinion, the same situations. why does four highlighting differ in { b: one.two&.three || four } and one.two&.three || four and the same goes for downcase color of which depends on if the hash is oneline or multiline.
You guys are doing great and I'm fine if there will be some edge cases but I just wish there was consistency. Like, okay, || four may be variable, but in one case its source.ruby in the other variable.other.ruby and the difference is the one is surrounded with curly braces and the other is not. Thats odd in my opinion. :)
Activity
wingrunr21 commentedon Mar 6, 2018
Can you use the
Developer: Inspect TM Scopestool to tell me what the detected scopes are for the various use cases (you can find that tool via the command palette).Also, is this highlighting different than v0.15.0?
#251 was what asked for this kind of highlighting to be put back. The highlighting doesn't really have any "smarts", it just assumes things are various language constructs.
roflomglol commentedon Mar 7, 2018
Yeah, sure. Here it is:
The code:
I can't tell for certain that it wasn't the issue in previous versions, but I've noticed it only after 0.17 and I'm using VS Code for some time now, so something have changed in the last version. If you tell me how to rollback to previous version, I can compare.
wingrunr21 commentedon Mar 7, 2018
Ok cool. No, this is good thanks. When you see
source.rubyit basically means "I know this is Ruby but no other pattern in the grammar matches this". It appears some of those method calls are being interpreted asvariable.other.ruby. This was a change made at the request of those in #251 to make the grammar more optimistic. I'll need to take a look at how the grammar is detecting this code.There's also varying levels of support across themes. When you say the Light theme works without issue but Solarized does not, it makes me think there are some grammar scopes missing.
I will say the instance of
|| fouris going to be basically impossible to highlight correctly 100% of the time. That circumstance could easily be a variable or a method call and we won't be able to make that determination based on pure regular expressions.roflomglol commentedon Mar 7, 2018
Thank you for your explanation. The problem I see here is that it behaves differently in, at least in my opinion, the same situations. why does
fourhighlighting differ in{ b: one.two&.three || four }andone.two&.three || fourand the same goes fordowncasecolor of which depends on if the hash is oneline or multiline.You guys are doing great and I'm fine if there will be some edge cases but I just wish there was consistency. Like, okay,
|| fourmay be variable, but in one case itssource.rubyin the othervariable.other.rubyand the difference is the one is surrounded with curly braces and the other is not. Thats odd in my opinion. :)wingrunr21 commentedon Mar 7, 2018
Agreed, it needs to be looked into.
andrewmcodes commentedon Sep 14, 2018
Is this still an issue with 0.20.0?
roflomglol commentedon Sep 25, 2018
@andrewmcodes It seems so, yes.
github-actions commentedon Aug 16, 2020
This issue has not had activity for 30 days. It will be automatically closed in 7 days.