-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
add dart class support #2677
add dart class support #2677
Conversation
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.
Almost there; see below
queries/dart.scm
Outdated
(class_definition | ||
name: (_) @className | ||
) | ||
(class_definition | ||
|
||
name: (_) @className | ||
) |
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.
Why do you have two of these?
queries/dart.scm
Outdated
|
||
name: (_) @className | ||
) | ||
] @class |
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.
The domain of class name should be the whole class, so that you can say "class name" from anywhere in the class
Note you'll need to rerun update fixtures after this change
] @class | |
] @class @className.domain |
queries/dart.scm
Outdated
( | ||
[ | ||
(class_definition | ||
|
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.
this empty line shouldn't appear. Have you installed all the recommended extensions? In particular, Andreas's vscode extension should autoformat .scm
files. Though maybe you need to configure it to be the formatter for .scm
files?
queries/dart.scm
Outdated
( | ||
[ | ||
(class_definition | ||
name: (_) @className | ||
) | ||
] @class @className.domain | ||
) |
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.
nitpicking here, but I believe you can remove both the square brackets and outer parens:
( | |
[ | |
(class_definition | |
name: (_) @className | |
) | |
] @class @className.domain | |
) | |
(class_definition | |
name: (_) @className | |
) @class @className.domain |
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.
looks good with minor nitpick!
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.
Looks good!
Checklist