-
-
Notifications
You must be signed in to change notification settings - Fork 84
Enable initial r support #2721
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?
Enable initial r support #2721
Conversation
I'm marking this as ready to make adding scopes easier. Once r support is included in cursorless, it will be easier for it to pick it up as an option for adding scopes |
Latest version of the parse tree is published and should be available in the marketplace very soon. |
[Content] = | ||
[Domain] = 0:0-0:3 | ||
>---< | ||
0| abc <- function(arg){ |
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 is the only case that I'm unsure about and is likely to need review, I'm wondering if it would make more sense to include the operator in this for removal and insertion? Although I might struggle a little bit with adding them as custom delimiters
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.
<-
should probably be added as a trailing range. That way it will be deleted if you delete the name.
We do the same thing with =
in value = 2
@AndreasArvidsson ready to review! Thank you again for your help yesterday |
Please add a scope test for an empty argument list as well. The difference is the insertion delimiter. Please have a look at how it's implemented in other languages. |
I would recommend that you create multiple scope files for the same facet instead of adding multiple different code examples in the same file. It's much simpler to review it that way. |
[Content] = | ||
[Domain] = 0:0-0:3 | ||
>---< | ||
0| abc <- function(arg){ |
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.
<-
should probably be added as a trailing range. That way it will be deleted if you delete the name.
We do the same thing with =
in value = 2
|
||
[#1 Trailing delimiter] = 0:5-0:6 | ||
>-< | ||
0| hello <- "world" |
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.
<-
should be part off the trailing range. Have a look at how we do this in other languages.
|
||
[#2 Trailing delimiter] = 1:5-1:6 | ||
>-< | ||
1| hello = "world" |
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.
=
should be part of the trailing range
|
||
[#1 Trailing delimiter] = 0:5-0:6 | ||
>-< | ||
0| hello <- "world" |
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.
<-
should be part of the trailing range
|
||
[#2 Trailing delimiter] = 1:5-1:6 | ||
>-< | ||
1| hello = "world" |
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.
=
should be part of the trailing range
|
||
[#2 Leading delimiter] = 1:7-1:8 | ||
>-< | ||
1| hello = "world" |
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.
=
should be part of the leading range
|
||
[#1 Leading delimiter] = 0:8-0:9 | ||
>-< | ||
0| hello <- "world" |
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.
<-
should be part of the leading range
[#2 Content] = | ||
[#2 Domain] = 1:8-1:15 | ||
>-------< | ||
1| hello = "world" |
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.
=
should be part of the leading range
8bb8dee
to
3bf717c
Compare
I'm still wrapping my head around treesitter to add the supported scopes, so I'll update this PR and add relevant tests once I do + once the r PR is added to vscode's parse tree
Checklist