Skip to content

Invalid snippet example in nested placeholder snippet #2194

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions