-
-
Notifications
You must be signed in to change notification settings - Fork 92
Add first zig scope facet #3111
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
AndreasArvidsson
left a comment
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.
I've gone through all your new tests and left comments. Please use typescript as a reference language to help you figure out the correct ranges. We do have a scope visualizer on the docs page to help you with this:
Per language:
https://www.cursorless.org/docs/user/languages/typescript/
Per scope:
https://www.cursorless.org/docs/contributing/scopes/argumentList/
The tests are also failing which you need have a look at.
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.
bbbis missing as a scope- The removal range of
aaais incorrect - The insertion delimiter is incorrect for a multiline argument
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.
Please use another language, eg javascript, as a reference:
https://github.com/cursorless-dev/cursorless/blob/d21522be750a55b70b50ac251300bfd6dd4baace/data/fixtures/scopes/javascript.core/argument/argument.actual.multiLine.scope
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.
bbbis missing as a scope- The removal range of
aaais incorrect - The insertion delimiter is incorrect
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.
Please include a second argument so we get a separate removal range in this scope test
| >-----< | ||
| 0| foo(); | ||
|
|
||
| [Insertion delimiter] = " " |
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 insertion delimiter should be an empty string
| >-------------< | ||
| 0| foo(aaa, bbb); | ||
|
|
||
| [Insertion delimiter] = " " |
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 insertion delimiter should be ", "
|
|
||
| [#3 Removal] = 0:14-0:23 | ||
| >---------< | ||
| 0| fn foo(aaa: u8, bbb: u8) void {} |
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.
Same problem here
| @@ -0,0 +1,62 @@ | |||
| fn foo(aaa: u8, bbb: u8) void {} | |||
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.
Please remove the arguments for this tests. Now the file is unnecessarily complicated.
|
|
||
| [Removal] = 0:11-0:14 | ||
| >---< | ||
| 0| const foo: u8 = 0; |
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.
Removal range should be : u8
| 0| const foo: number = 0; |
| @@ -0,0 +1,20 @@ | |||
| const foo = "bar"; | |||
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.
Assignment should be assigning a value to an already existing variable. Please rename this file to value.variable
|
|
||
| [Removal] = 0:11-0:17 | ||
| >------< | ||
| 0| const foo = "bar"; |
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.
Removal range should be = "bar"
| 0| const foo = 0; |
First slice of zig working end to end.
Let me know if there is anything I should change, e.g. should I make the query less specific? I have never used tree-sitter queries before