Change:
} SnippetController2.get(editor)?.insert(snippet.codeSnippet, { clipboardText }); } <del> private async _pickSnippet(snippetService: ISnippetsService, quickInputService: IQuickInputService, languageId: string): Promise<Snippet | undefined> { interface ISnippetPick extends IQuickPickItem { snippet: Snippet; } const snippets = (await snippetService.getSnippets(languageId, { includeDisabledSnippets: true, includeNoPrefixSnippets: true })).sort(Snippet.compare); const makeSnippetPicks = () => { const result: QuickPickInput<ISnippetPick>[] = []; let prevSnippet: Snippet | undefined; for (const snippet of snippets) { const pick: ISnippetPick = { label: snippet.prefix || snippet.name, detail: snippet.description, snippet }; if (!prevSnippet || prevSnippet.snippetSource !== snippet.snippetSource || prevSnippet.source !== snippet.source) { let label = ''; switch (snippet.snippetSource) { case SnippetSource.User: label = nls.localize('sep.userSnippet', "User Snippets"); break; case SnippetSource.Extension: label = snippet.source; break; case SnippetSource.Workspace: label = nls.localize('sep.workspaceSnippet', "Workspace Snippets"); break; } result.push({ type: 'separator', label }); } if (snippet.snippetSource === SnippetSource.Extension) { const isEnabled = snippetService.isEnabled(snippet); if (isEnabled) { pick.buttons = [{ iconClass: Codicon.eyeClosed.classNames, tooltip: nls.localize('disableSnippet', 'Hide from IntelliSense') }]; } else { pick.description = nls.localize('isDisabled', "(hidden from IntelliSense)"); pick.buttons = [{ iconClass: Codicon.eye.classNames, tooltip: nls.localize('enable.snippet', 'Show in IntelliSense') }]; } } result.push(pick); prevSnippet = snippet; } return result; }; const picker = quickInputService.createQuickPick<ISnippetPick>(); picker.placeholder = nls.localize('pick.placeholder', "Select a snippet"); picker.matchOnDetail = true; picker.ignoreFocusOut = false; picker.keepScrollPosition = true; picker.onDidTriggerItemButton(ctx => { const isEnabled = snippetService.isEnabled(ctx.item.snippet); snippetService.updateEnablement(ctx.item.snippet, !isEnabled); picker.items = makeSnippetPicks(); }); picker.items = makeSnippetPicks(); picker.show(); // wait for an item to be picked or the picker to become hidden await Promise.race([Event.toPromise(picker.onDidAccept), Event.toPromise(picker.onDidHide)]); const result = picker.selectedItems[0]?.snippet; picker.dispose(); return result; } </del> } registerEditorAction(InsertSnippetAction);

Discussion:
Snippets that use the SELECTION variable should be grouped into a new "Surround With..."-command, e.g support selection with try-catch or if-else. We should also consider not showing such snippets in IntelliSense because the selection is always where users are typing.
closing this in favour of
After and given that a dedicated command is more visible we should add this
hi, Thanks for your adding support for outside code and could please add some identification for those snippet support and/or when users are using command e.g.: when using insert snippet, users never know which snippet is outside-code supported there is the ui: ! and the snippet code from C# official extension ! for that reason, I have to add some tip/text for the name of snippet when I develop the snippet extension. after that, user could know that which is outside code supported. ! I could do it for myself and my extension, I there are many snippets that have no tip or identification Please add some identification for those outside code supported in UI when users using insert snippet. that will be useful and helpful for user to distinguish
! maybe some icon for text is good
BTW, there is another issues related to this. please
hi, should I file a new issue?
To verify open a typescript files select some code select F1 Surround with Snippet try-catch ensure the selected code is surrounded by the snippet
Verification looked good with both TS and CS files.