jwdeane/11ty-vscode-snippet-generator

Create 11ty filter to populate the snippet body with an array of the source data (line by line)

Closed this issue · 0 comments

https://github.com/25thhour/11ty-vscode-snippet-generator/blob/04fbb2144a39c2f2e79f8fc149629e9ff153622c/_includes/vscode-snippet-template.njk#L4

Ref: 11ty filter documentation

A vscode snippet body is:

…is one or more lines of content, which will be joined as multiple lines upon insertion. Newlines and embedded tabs will be formatted according to the context in which the snippet is inserted.
https://code.visualstudio.com/docs/editor/userdefinedsnippets

An example implementation can be found in the Snippet Generator source code:

https://github.com/pawelgrzybek/snippet-generator/blob/2fbb572fb07820715502da910120b8f4e3287c26/src/components/VSCode.js#L14-L17