Vscode-ruby: Symbol strings (ex. :abc) via "Remote - SSH" are not correctly highlighted

Created on 12 May 2019  ·  22Comments  ·  Source: rubyide/vscode-ruby

Your environment

  • vscode-ruby version: 0.22.3
  • Ruby version: 2.6.3
  • Ruby version manager (if any): rbenv
  • VS Code version: 1.34.10-insider
  • Operating System: Windows
  • Using language server? Solargraph
  • Using via "Remote - SSH" remote environment _(Link)_

Expected behavior

Symbol strings syntax is correctly highlighted

Actual behavior

Symbol strings syntax is incorrectly highlighted

In the picture below :exception should be highlighted
image

Most helpful comment

This has been resolved in v0.26.0

All 22 comments

I think these are not the same problems. Ruby symbols are correctly highlighted without any language servers anyway.

Have you tried that on an ordinary vs code?

@minkir014 "Remote - SSH" extension does only work on VS Code Insider I'm afraid.

hi @danglduy

Can you use the Developer: Inspect TM Scopes tool (accessible via the command palette) to tell me what scopes are being matched for the with: :exception part of that code?

The with: should be matching the grammar with a scope of constant.language.symbol.hashkey.ruby and :exception should be constant.language.symbol.ruby.

@wingrunr21 I inspected with: and :exception
image
image

Ok. What theme are you using? The Ruby grammar is correctly matching the TM scopes but it appears your theme does not have support.

@wingrunr21 I am using the default theme.

Which is that? Dark+?

Yes it’s Dark+

interesting. I also use Dark+ and I get those keywords highlighted in blue. Do you get highlighting with a different theme?

@wingrunr Have you tried using in “Remote SSH” environment? I get highlighted normally in local environment.

No but that's what I'm trying to determine what the problem is. Does another theme give you correct highlighting?

The Remote SSH environment isn't stable yet and this extension doesn't explicitly support it. Theming is a core VSCode function as well. The grammar is supplying and matching a TM Scope but the theme doesn't have a matching style.

Following

Here's the difference between correctly working TM scope and a not correctly working one:

CORRECT
image

INCORRECT
image

Issue is in constant.language vs constant.other.symbol

How have you displayed this in vscode insiders??? I mean what is displayed in the images.

How have you displayed this in vscode insiders??? I mean what is displayed in the images.

I opened the same directory in two windows, one was local VSCode and another one was Remote SSH.

There's a command in the command palette called "Inspect TM Scopes", I think that's what they're asking for.

That's what it is. I'm digging into Remote environments after I fix the current issue with tree-sitter. I haven't yet researched why VSCode is assigning different TextMate scopes between the two environments.

Any updates on this?

This has been resolved in v0.26.0

@wingrunr21 thank you so much! This has been sorely lacking in my Ruby experience :)

Was this page helpful?
0 / 5 - 0 ratings