atom / language-ruby

Ruby package for Atom
Other
100 stars 144 forks source link

Inconsistency on percent string symbol syntax using Tree-sitter #255

Closed foreverqihe closed 5 years ago

foreverqihe commented 5 years ago

Prerequisites

Description

The symbol syntax doesn't get rendered correctly: using Tree Sitter image

NOT using Tree Sitter image

Edit by @rsese with scope screenshots:

it does seem like the tokens should be scoped as symbols?

percent-string-symbols

symbol

Steps to Reproduce

  1. Open Atom
  2. Open a Ruby file
  3. write code show as the snapshot

Expected behavior: [The color should be consistent as the syntax is an alternative syntax for symbol in Ruby so it should be the same color as other symbols]

Actual behavior: [using Tree Sitter, when we write the symbol with the %i syntax, the color changed to brown]

Reproduces how often: [Always]

Versions

Atom : 1.32.2 Electron: 2.0.9 Chrome : 61.0.3163.100 Node : 8.9.3 Windows 7

Additional Information

rsese commented 5 years ago

Thanks for the report - it does seem like the tokens should be scoped as symbols?

percent-string-symbols

symbol

Not 100% sure but we'll ask the team to take a look.

jasonrudolph commented 5 years ago

This is resolved as of https://github.com/atom/language-ruby/pull/271, so I'm gonna close this out. You can see the changes below. 😅

Atom 1.40.0 (current stable release)

Screen Shot 2019-08-16 at 9 59 00 AM

Atom 1.42.0-nightly2 (current nightly release)

Screen Shot 2019-08-16 at 10 03 50 AM