Skip to content
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

Merged
merged 6 commits into from
Nov 12, 2024
Merged

add dart class support #2677

merged 6 commits into from
Nov 12, 2024

Conversation

sonnyvesali
Copy link
Contributor

Checklist

@sonnyvesali sonnyvesali requested a review from a team as a code owner November 9, 2024 22:54
Copy link
Member

@pokey pokey left a 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
Comment on lines 24 to 30
(class_definition
name: (_) @className
)
(class_definition

name: (_) @className
)
Copy link
Member

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
Copy link
Member

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

Suggested change
] @class
] @class @className.domain

queries/dart.scm Outdated
(
[
(class_definition

Copy link
Member

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
Comment on lines 21 to 27
(
[
(class_definition
name: (_) @className
)
] @class @className.domain
)
Copy link
Member

@pokey pokey Nov 11, 2024

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:

Suggested change
(
[
(class_definition
name: (_) @className
)
] @class @className.domain
)
(class_definition
name: (_) @className
) @class @className.domain

Copy link
Member

@pokey pokey left a 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!

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

queries/dart.scm Outdated Show resolved Hide resolved
@pokey pokey enabled auto-merge November 12, 2024 20:50
@pokey pokey added this pull request to the merge queue Nov 12, 2024
Merged via the queue into cursorless-dev:main with commit 2e2a159 Nov 12, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants