-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed function highlighting #65
Fixed function highlighting #65
Conversation
(((identifier) @function (#match? @function "^_?[a-z]")) | ||
. (selector . (argument_part))) @function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(expression_statement | ||
(selector | ||
(unconditional_assignable_selector | ||
(identifier) @function)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I'm not worrying about annotating the differences between @function
and @function.method
probably will look at this later, if it's considered beneficial
@@ -167,6 +190,7 @@ | |||
(const_builtin) | |||
(part_of_builtin) | |||
(rethrow_builtin) | |||
(void_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void is not really a type in dart, and most existing highlighting treats it as a keyword (thinking mostly the LSP syntax highlighting the vscode implements)
Highlighting functions was fairly inconsistent, and utilized the not supported
@method
selectorThis PR reworks highlights.scm queries for functions, support different syntax highlighting for methods and properties, as well as function definitions and invocations
Before
After