Reputation: 497
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:
src/prj/some_app/models.py
src/prj/some_app/models/pizzas.py
Upvotes: 3
Views: 332
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