-
Notifications
You must be signed in to change notification settings - Fork 286
Groupings #345
Comments
Basically all of this will be covered by #317 but I'll elaborate here: It has proven to be difficult to meet everyone's use case for highlighting, folding, etc via the Textmate grammar support that VSCode provides. As ruby is so dynamic, it's very difficult to use a regex based approach to parse it. My in-progress solution for this is to use an AST to facilitate accurate code representations. Code folding via matched pairs is currently a proposed language server feature. I have it mostly working in a local branch via the proposed protocol. VSCode itself shipped support for this via an opt-in flag a little while ago. In terms of highlighting support, semantic highlighting via the language server is currently pre-proposal (see microsoft/language-server-protocol#18). Until that occurs, we can't get much better than the current highlighting support. We can try and focus the regex's in the Textmate grammar some more, but that ends up being too specific and users lose highlighting support for other things. |
Completely understand, just wanted to toss a few more instances at you incase any were missed. good luck and keep it up! :) |
I've run in to some issues whit the way the language is parsed.
The first is that a code block like this doesnt fold correctly because of the multiline string,
also
for
matching in the comment, oddly it detects, but doesnt care about the 'end' in the commentI realize this code is all banged up, its just the shortest bit of code i could provide to display the issues.
It also breaks with this format
myVar = someStuff if myVar.nil?
the if is matched with the next 'end'
The text was updated successfully, but these errors were encountered: