-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add when/context support for snippets in packages.json #26943
Comments
Unsure... There is little desire to add more complexity to static snippet because we thing adding a completion provider isn't much overhead |
I don't think it's totally trivial to go from a declarative json file to programming a completion provider, but maybe it's easier than I think? Do I need to look at the typed characters and filter the list, or can I just send all my snippets all of the time via the completion provider? |
Just sending them should do it. The UI filters then using the current word |
Ok great, maybe much simpler than I thought :-) |
We have no plans of doing, especially considering being able to add some sort of scope information to snippets (see #22661) and that extensions can do much more. |
Currently snippets defined in
packages.json
are only filtered by language (as far as I can tell):I would like to add some additional snippets but they're only relevant to a subset of Dart projects (Flutter) so it'd be nice if we were able to add contexts to snippet contribution like we can with commands:
I know we could do this by adding them to the completion provider, but that seems like significant complexity when there's nothing dynamic, we just want a toggle for the whole file.
The text was updated successfully, but these errors were encountered: