Skip to content

Conversation

pokey
Copy link
Member

@pokey pokey commented Oct 15, 2021

@pokey pokey marked this pull request as draft October 15, 2021 22:50
@pokey pokey removed the request for review from AndreasArvidsson October 15, 2021 22:50
@pokey pokey marked this pull request as ready for review October 17, 2021 17:34
wrapper_snippets = {
"else state": "cursorless.wrapper.ifElseStatementElseBranch",
"if else": "cursorless.wrapper.ifElseStatementIfBranch",
"if state": "cursorless.wrapper.ifStatement",
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this term is configured independently from "if state" the scope type. Could be surprising to users but I wasn't sure of the right approach here because there are multiple ways to wrap something with an if statement and I could see people wanting to wrap differently from how they refer to scope type maybe? Also, fwiw, I have configured this to "if" for myself, because I think I can get away with shorter name than when it's used for a scope type

Comment on lines 26 to 29
"else": "ifElseStatement/alternative",
"if else": "ifElseStatement/consequence",
"if": "ifStatement/consequence",
"try": "tryCatchStatement/body",
Copy link
Member Author

Choose a reason for hiding this comment

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

Note the new <snippet name>/<variable name> syntax here

@pokey pokey merged commit 20471f0 into develop Oct 25, 2021
@pokey pokey deleted the snippet-wrap branch October 25, 2021 12:14
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