question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistency for Ruby 1.9 symbol

See original GitHub issue

Thank you for solving the ruby color for symbol. It would be great if you can do one more change for an alternative symbol syntax for Ruby 1.9+

:one => 1 # normal form

one: 1 # ruby 1.9+

So it is still inconsistent. And even the function args look different as well:) Atom:image

One Dark Pro: image

_Originally posted by @foreverqihe in https://github.com/Binaryify/OneDark-Pro/issues/258#issuecomment-427642264_

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chpxucommented, Oct 24, 2018

Alright I get it now. Thanks for the help.

When installing the Ruby extension on VSCode, it creates additional scopes that native VSCode does not have. Of these scopes which are relevant to your issue, are: variable and constant. Since One Dark Pro only really supports the languages’ prebuilt scopes (and Ruby never provided them in the first place), the default highlighting for these scopes will just come into effect. As such the default variable is that red colour and the default constant is that yellowish-orange.

Now I haven’t investigated Atom completely, but it seems the Ruby language doesn’t define those variable and constant scopes like VSCode, hence it uses that highlighting shown in your first screenshot. You might then suggest to incorporate this change but that’d be up to @Binaryify as it is extension-related rather than prebuilt. You could always fork and open a pull request, or I could… Either is fine, but he has the final say :>

Hope this helps!

0reactions
foreverqihecommented, Oct 31, 2018

You could also just define them in your settings.json too…

Thank you for the investigation. Would you mind letting me know how to do it in the settings.json, if it doesn’t take too much time for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistent documentation regarding parameter validation
Documentation is inconsistent with regards to parameter validation. ... The => is a Ruby 1.8.7 syntax, which was replaced by : in Ruby...
Read more >
Update your entire project to Ruby 1.9 hash syntax
Update your entire project to Ruby 1.9 hash syntax. In version 1.9 Ruby introduced new syntax for hash literals whose keys are symbols....
Read more >
Feature #5607: Inconsistent reaction in Range of String
Description. =begin. When I tried to access excel file, I found some inconsistent behavior about range of string. ruby-1.9.3-p0 :001 > ("A".."AB").to_a
Read more >
Is Hash Rocket deprecated? - ruby - Stack Overflow
1 Answer 1 · You must use the rocket for symbols that are not valid labels: :$set => x is valid but $set:...
Read more >
Class: Struct (Ruby 1.9.1)
A Struct is a convenient way to bundle a number of attributes together, using accessor methods, without having to write an explicit class....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found