Closed caleb531 closed 5 years ago
:heart:
@nathansobo Wonderful! Any chance these changes will make it into the upcoming Atom v1.37? I only ask because I think it would be fitting complement to my recently-merged #296, which enables the tree-sitter parser more fully for Python files.
@caleb531 We're probably going to want this to go through the entire release cycle to identify any regressions before it reaches stable.
If you absolutely can't wait it should be available in the nightly builds, but note that that channel has zero manual testing on it and things may break at any time as it's built directly from Atom's master
branch.
@50Wliu @Arcanemagus I myself can totally wait—I already have these changes in my init file anyway (thanks to SyntaxScopeMap
's addSelector
method). I was just thinking about other Atom users who may want the fullest of syntax highlighting sooner, but your reasoning and process make perfect sense, and I respect that.
Requirements
Description of the Change
This PR tokenizes the formal function parameters in the
tree-sitter
grammar:Before:
After:
Alternate Designs
I don't know if the core Atom team would prefer to use a different scope to tokenize these formal function parameters. However, the
variable.parameter.function
scope is already used to tokenize keyword arguments in the tree-sitter grammar, so I don't think there's any inconsistency here.Benefits
Better highlighting for the formal function parameters in Python files matched by the tree-sitter grammar. This matches the highlighting in the existing first-mate grammar.
Possible Drawbacks
None that I can see.
Applicable Issues
N/A