Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Added scopes for many kernel and special methods in tree-sitter parser #285

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gsmetal
Copy link

@gsmetal gsmetal commented Jun 12, 2020

Description of the Change

Added scopes for many kernel and special methods in tree-sitter parser.
For example:

  • visibility methods (private, protected ...)
  • new method
  • Gemfile-specific methods
  • lambda notation (->(a) { })
  • attr_accessors
  • some predefined constants (ENV, __FILE__)

Alternate Designs

None.

Benefits

More accurate highlighting.

Possible Drawbacks

None.

Applicable Issues

#252

Disclaimer

  1. I didn't understand how to "extend" grammars to make Gemfile's grammar separate and just extend ruby grammar with some specials. Is it possible?
  2. I haven't found any explicit information about available scopes and logic for mapping them to each language-specific situation. So I've done my best effort.

@chbk
Copy link
Contributor

chbk commented Apr 28, 2021

As a heads up, except for the gemfile specific methods, #291 provides scopes for everything in this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants