-
Notifications
You must be signed in to change notification settings - Fork 340
Description
As I can see you have this class https://github.com/Dart-Code/Dart-Code/blob/684a3ad5f15529e507139f95b9617240ec20a56a/src/extension/providers/snippet_completion_item_provider.ts which registers snippets to the completion provider. And you're using snippets/dart.json and snippets/flutter.json in here
Dart-Code/src/extension/extension.ts
Line 340 in b6aac60
| // Snippets are language-specific |
package.json file like this:
"snippets": [
{
"language": "dart",
"path": "./snippets/dart.json"
},
{
"language": "dart",
"path": "./snippets/flutter.json"
}
]
The issue with registering them inside extension itself by using completion provider removes ability to use Control Snippets extension which gives ability to disable/enable snippets.
My suggestions is to simply remove SnippetCompletionItemProvider class and also registration in extension.ts for flutter and dart snippets and simply add snippets in package.json as mentioned above. This gives ability to easy control snippets and it uses default VS Code mechanism.
Also, it would be cool to separate snippets for dart and flutter into their repos/extension dirs. Keep snippets/dart.json in this repo https://github.com/Dart-Code/Dart-Code and move snippets/flutter.json to this repo https://github.com/Dart-Code/Flutter since they are different tools and it gives ability to easily disable/enable snippets for Dart and Flutter separately.
I hope it makes sense, if needed I could provide a PR. Thanks a lot!