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

Tokenize subclass list names in tree-sitter grammar #298

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

caleb531
Copy link
Contributor

@caleb531 caleb531 commented Apr 6, 2019

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR tokenizes the names of subclasses listed within class definitions, for Python files matched by the tree-sitter grammar.

Before:
Screen Shot 2019-04-06 at 2 09 32 PM

After:
Screen Shot 2019-04-06 at 2 10 30 PM

Alternate Designs

I don't know if the Atom team desires to tokenize these subclass names differently; I figured entity.other.inherited-class was the most appropriate scope, as it's based on the same scope from the first-mate grammar.

Benefits

Syntax highlighting that is more familiar to longtime users of the Python first-mate grammar.

Possible Drawbacks

Perhaps some might prefer different colors be used for the subclass names, though I personally like them.

Applicable Issues

N/A

@nathansobo nathansobo merged commit d901fb9 into atom:master Apr 10, 2019
@nathansobo nathansobo self-assigned this Apr 10, 2019
@nathansobo
Copy link
Contributor

Cool of you to break these up. Far from a Python expert but this also seems reasonable.

@50Wliu 50Wliu mentioned this pull request Apr 24, 2019
1 task
@caleb531 caleb531 deleted the tree-sitter-subclass-names branch May 12, 2019 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants