-
Notifications
You must be signed in to change notification settings - Fork 286
HEREDOC syntax issues #485
Comments
It inexplicably got closed because of stale issue clean up (which was clearly posted in the issue). Can you please post what TM Scopes the grammar is matching for the offending syntax? |
For what token in particular? (I get a popup that displays a lot of info about the token under the cursor) p(<<~'SOMETEXT' , <<~OTHERTEXT, Time.now)
test1 if unless else "foorbar"
SOMETEXT
test2 if unless else "foobar"
OTHERTEXT (GitHub has the same broken highlighting, nice) |
It maybe a problem with vs code. See this might help you solve the issue. |
@Wuerfel21 I think @minkir014 is right. The highlighting is based on older heredoc syntax. When VSCode lands semantic highlighting support (meaning I can highlight based on the AST and not grammar regexes) this will be fixable. Otherwise, we'll need a fix pushed to the upstream atom/language-ruby grammar and I can pull it in. |
This bug comes from vscode microsoft/vscode#62812 |
I played with this tree-sitter extension https://github.com/georgewfraser/vscode-tree-sitter it is ok with heredoc. |
It doesn’t support themes. If you are ok with its static theming the its an option. I also use tree sitter so when VSCode exposes the APIs to support TextMate scopes I can support this the same way |
This issue has not had activity for 30 days. It will be automatically closed in 7 days. |
Your environment
vscode-ruby
version: 0.22.3Expected behavior
Correct syntax highlighting of HEREDOCS.
Actual behavior
All text that follows on the same line after a HEREDOC is treated as a string literal. (Issue #183 was already filed about this, but inexplicably got closed). Even worse, when there are multiple HEREDOCS on one line, only the first one's contents are recognized as a string literal.
![image](https://user-images.githubusercontent.com/6944842/58183537-ce134080-7caf-11e9-8379-d55a4596aae5.png)
The text was updated successfully, but these errors were encountered: