-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Migrate collection item and argument scopes #2081
Changes from all commits
1046522
4daa292
f90eedd
6ddfe3f
32e2277
aca116e
7420dec
4dbd9f5
bb0e6a6
b0e3331
6fd01d1
45f96b1
1126918
2878f44
685af60
1956c86
c85623e
17657f3
d484c2b
265aee8
11e4ebb
33fdd5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,17 @@ export class TreeSitterScopeHandler extends BaseTreeSitterScopeHandler { | |
true, | ||
); | ||
|
||
const rawPrefixRange = getRelatedRange( | ||
match, | ||
scopeTypeType, | ||
"prefix", | ||
true, | ||
); | ||
const prefixRange = | ||
rawPrefixRange != null | ||
? new Range(rawPrefixRange.start, contentRange.start) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should prob only do this if we decide to go ahead with #2108 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really don't like having to do unnecessary syntax, but sure we can await that discussion. |
||
: undefined; | ||
|
||
return { | ||
editor, | ||
domain, | ||
|
@@ -80,11 +91,12 @@ export class TreeSitterScopeHandler extends BaseTreeSitterScopeHandler { | |
editor, | ||
isReversed, | ||
contentRange, | ||
prefixRange, | ||
removalRange, | ||
leadingDelimiterRange, | ||
trailingDelimiterRange, | ||
interiorRange, | ||
delimiter: insertionDelimiter, | ||
insertionDelimiter, | ||
}), | ||
], | ||
}; | ||
|
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.
getDefaultIterationRange
throws an error so we never got to the legacy implementation belowThere 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.
Is it a
NoContainingScopeError
? If so I'd argue we should look for that error specificallyThere 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.
True. Fixed now
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.
Just commenting from the future to say that we removed this :D #2740