You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is me breaking out some functionality that was part of PR #1911
since that PR has lots of work to be done and it may still benefit other
languages that get in sooner. I've applied the suggested changes from
pokey in that PR's code review.
I've also added a placeholder map for lua which uses `[[ ]]` for
multiline support as noted in PR #1962, however I realized as I went to
add it that it's not as simple as the way I did it for nix because I
can't just reuse the existing `singleQuote` entry since lua actually
uses single quotes. So this may actually be a bit harder, and reminds me
of [this
discussion](#1992 (comment)).
So before I go randomly hacking stuff I'm curious what you think the
best approach here is.
These are the comments I had left in the Nix PR about these changes:
* I called returning delimiterToText as getSimpleDelimiterMap to kind of
mirror complexDelimiterMap.
* I'm not sure is if you still want a delimiterMap.ts standalone file,
and then a getSimpleDelimiterMap.ts only for that function. Now
delimiterToText isn't referenced anywhere else, so seemed maybe okay to
keep them together.
* I also thought about adding getComplexDelimiterMap(), but atm because
complexDelimiterMap only ever uses the keys from the delimiterToText it
won't change even if the language has different values, so seemed
unnecessary. These are all things I could guess at your preferences, but
may as well ask instead.
* I also noticed leftToRightMap in that file isn't actually used
anywhere so can be deleted I think, but also not sure about doing that
as part of a totally unrelated code change, to keep commits clean.
## Checklist
- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [-] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [x] I have not broken the cheatsheet
---------
Co-authored-by: fidgetingbits <[email protected]>
Co-authored-by: Pokey Rule <[email protected]>
Copy file name to clipboardExpand all lines: packages/cursorless-engine/src/processTargets/modifiers/surroundingPair/findSurroundingPairParseTreeBased.ts
+4-1
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,10 @@ export function findSurroundingPairParseTreeBased(
0 commit comments