Skip to content

Invalid snippet example in nested placeholder snippet #2194

@MariaSolOs

Description

@MariaSolOs

Related discussions

${1:another ${2:placeholder}} (a snippet example provided here) isn't a valid snippet according to the LSP grammar.

A placeholder node is defined as placeholder ::= '${' int ':' any '}' where any ::= tabstop | placeholder | choice | variable | text. In the provided snippet the any (after the colon) would match another (as a text node) and then parsing crashes (as expected) because the placeholder value incorrectly consists of multiple nodes.

In order to ensure consistency across editors (as a primary goal of LSP) we need to clarify the feature descriptions and/or grammar to reflect the expected capabilities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions