Skip to content

Variable substitution in snippet preview #181112

@dimateos

Description

@dimateos

You can see a preview of the body in the documentation popup / inline when inserting snippets, but there is no variable substitution:

image

image

The snippet contains $LINE_COMMENT -> // which is correclty added when the snippet is inserted. The variables are just removed like the positional tags. Which IMO should be left as they might be useful for the user to know what the snippet does before insertion.

So maybe an option to show the variables including tags, and then an improvement actually parsing the enviroment variables.

"ts": {
    "prefix": "ts",
    "body": [
        "std::to_string($0) $LINE_COMMENT not previewed",
    ],
    "description": "to std::str",
},

could be considered a visual bug?

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions