Skip to content

Add suffixedMatcher; use for keys#260

Merged
pokey merged 4 commits intomainfrom
pokey-key-prefix
Sep 6, 2021
Merged

Add suffixedMatcher; use for keys#260
pokey merged 4 commits intomainfrom
pokey-key-prefix

Conversation

@pokey
Copy link
Copy Markdown
Member

@pokey pokey commented Sep 6, 2021

Allows saying "chuck key" and having the trailing : cleaned up

Comment thread src/util/nodeSelectors.ts
node: SyntaxNode
): SelectionWithContext {
const leadingDelimiterToken = node.previousSibling;
const leadingNonDelimiterToken = node.previousSibling?.previousSibling;
Copy link
Copy Markdown
Member Author

@pokey pokey Sep 6, 2021

Choose a reason for hiding this comment

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

Note that we now use the end of the token before the delimiter rather than the start of the delimiter itself. This way, for example, if you have foo = bar and say "chuck value", you won't get the trailing space after foo. See changed test case above (chuckValue)

@pokey pokey merged commit 8488e91 into main Sep 6, 2021
@pokey pokey deleted the pokey-key-prefix branch September 6, 2021 16:58
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