atom / language-ruby

Ruby package for Atom
Other
101 stars 145 forks source link

Safe Navigation operator (&.) should be an operator #167

Open JustinAiken opened 8 years ago

JustinAiken commented 8 years ago

Support for this operator was added in https://github.com/atom/language-ruby/pull/125, but I think it should be classified different:

If there's an agreement, I'd be happy to open a PR that changes it along with the test

hediyi commented 8 years ago

I think "logical" is a bad scope name for &.:

bbugh commented 5 years ago

Is there any way to make progress with this? I don't have syntax highlighting for safe navigation operators in VSCode which uses this language server. Considering this is a few years old, it would be nice!

jmoglesby commented 3 years ago

This issue was addressed for the vscode-ruby library, but it still has not been addressed for the atom/language-ruby library.

Here was the vscode-ruby solution, which I believe is still using TextMate:

{
    "comment": "Safe navigation operator",
    "match": "(&\\.)\\s*(?![A-Z])",
    "captures": {
        "1": {
            "name": "keyword.operator.logical.ruby"
        }
    }
},

Can we get this applied to the Tree-sitter version for Atom, so that Safe Nav operators can be highlighted as operators, rather than as methods?