microsoft / microsoft/language-server-protocol
Invalid snippet example in nested placeholder snippet
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LSP 3.17 snippet syntax specification and the related discussion, then compare the nested placeholder example with the stated grammar. The work is done when the specification clearly defines the expected behavior and grammar consistently across editors.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100