cursorless
cursorless copied to clipboard
Snippet with `insertionScopeType: branch` will inherit the target branch's indentation level (python)
Input:
if True:
air()
Snippet definition (named else if)
{
"elseIfStatement": {
"definitions": [
{
"scope": {
"langIds": [
"python"
]
},
"body": [
"elif $condition:",
"\t$consequence"
]
}
],
"description": "Else if statement",
"variables": {
"consequence": {
"wrapperScopeType": "statement"
}
},
"insertionScopeTypes": [
"branch"
]
}
}
Saying snippet else if after air results in
if True:
air()
elif _:
_
But we expect
if True:
air()
elif _:
_