Skip to content

Conversation

futuremotiondev
Copy link

Hey Wenfang Du,

I updated your extension to include a configuration option to enable/disable escaping VSCode snippet variables like $name, ${name:default}, or $TM_SELECTED_TEXT.

The configuration option is doNotEscapeSpecialVariables and can be set at a user or workspace level. It defaults to true for all languages except PowerShell due to the fact that PowerShell variables always start with a dollar sign and snippets will become corrupted.

I've outlined this in detail in this issue.

This is my attempt to remedy the problem.

It would be great if you merged this, but if not - I'll fork my own version and continue development there.

Let me know your thoughts!

Futuremotion added 6 commits April 30, 2025 12:59
…le to get the override to work. For now, escaping is exclusively controlled by the snippet-generator.doNotEscapeSpecialVariables configuration value.
@wenfangdu
Copy link
Owner

Thanks for the PR, Jay! Unfortunately, I just started vacation, will get back to you in a few weeks. If the PR works for you, you can build it to a location extension to use before I incorporate these changes into the extension, thanks!

@wenfangdu wenfangdu merged commit 32f2660 into wenfangdu:main May 13, 2025
@futuremotiondev
Copy link
Author

Awesome! Glad it made it in the new version. Thanks for considering and approving the PR.

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