batisteo
batisteo

Reputation: 497

VSCode Document Selector for snippets

Is there a way to filter the suggested snippets regarding the file path name?

This could be similar to pattern parameter for the Document Selector API.

For example, I would like to suggest only snippets for Model if the current file path matches the pattern "**models**", eg:

Upvotes: 3

Views: 332

Answers (1)

Matt Bierner
Matt Bierner

Reputation: 65663

This is not possible using user snippets as of VS Code 1.25

However an extension could provide these types of dynamic snippets by implementing a CompletionItemProvider that contributes the snippets

Upvotes: 1

Related Questions