Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Incorrect grammar scope assigned for hash keys that match "core" Ruby functions #591

@arempe93

Description

@arempe93

Scopes for keywords/hash keys seem broken unless there is a . preceding the method call.

Your environment

  • vscode-ruby version: 0.27.0
  • Ruby version: 2.6.2
  • Ruby version manager (if any): rvm
  • VS Code version: 1.42.1
  • Operating System: OSX 10.15.3 Catalina
  • Using language server? (eg useLanguageServer is true in your configuration?): No

Expected behavior

Before changes in #579:

Screen Shot 2020-03-02 at 10 28 38

All keyword arguments/hash keys have scopes:

constant.language.symbol.hashkey.ruby
meta.function-call.ruby
source.ruby

First group additionally has:

punctuation.definition.constant.hashkey.ruby

Actual behavior

After upgrading to 0.27.0:

Screen Shot 2020-03-02 at 10 43 41

First group keyword arguments/hash keys have scopes:

support.function.core.ruby
meta.function-call.ruby
source.ruby

Second group have scopes:

constant.language.symbol.hashkey.ruby
source.ruby

Code Sample

find!(id: 1)
find!({ id: 1 })

Candidate.find!(id: 1)
Candidate.find!({ id: 1 })

Metadata

Metadata

Assignees

Labels

bugBug reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions