-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add $PREFIX (or $TRIGGER) variable #218
Comments
It's interesting. But VSCode has not such variables https://github.com/microsoft/vscode/blob/main/src/vs/editor/contrib/snippet/snippetVariables.ts#L21 |
I know but there's also |
Hm... Should we introduce context-specific variable resolution? |
Ah... We already have specific variables. |
Maybe |
I've had a look and it seems that this feature isn't possible without changes to vsnip. So the prefix would have to be added to the context when the snippet is detected and then handed down to the registered variables in their context. Is this something you would merge when I create a PR for it? |
I think we should add the prefix to I can merge the PR maybe. |
While I still think this would be a nice addition I'm not sure I'll find the necessary time to implement it. |
Having these nearly identical snippets:
I would love to be able to write them as one:
Where
$PREFIX
is eitherlet
orvar
depending on what was used to trigger the snippet.The text was updated successfully, but these errors were encountered: