Repository navigation
Show active editor language first in Configure Snippets - #324369
Martin Aeschlimann (aeschli) merged 5 commits into
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Pull request overview
This PR improves the "Configure Snippets" quick pick (workbench.action.openSnippets) so the active editor's language surfaces first, addressing issue #324336. It passes editorService.activeTextEditorLanguageId into computePicks, and after the usual sort it promotes the matching entry to the top of both the existing-snippet-files group and the new-language group. When there is no active editor, or the language is already first/absent, the previous ordering is preserved.
Changes:
- Injected
IEditorServiceintoConfigureSnippetsAction.runand forwarded the active language id tocomputePicks. - Added post-sort reordering in
computePicksto move the active language's existing.jsonfile and its "new language" entry to the front. - Kept a graceful fallback to the prior order when there is no active editor language or it's already first.
|
closing this — #324336 was closed as not planned on sep 6 after the feature request didn't reach the 20 upvote threshold, so there's no issue left for this to fix. happy to revisit if it ever makes the backlog. |
|
The request makes sense, ok to continue with it |
|
1 similar comment
|
b964d54
into
microsoft:main
Fixes #324336.
Reorders the "Configure Snippets" quick pick so the active editor's language is listed first, in both the existing-snippet-files group and the new-language group. So with a Python file open, python.json (or the "new Python snippets" entry) shows at the top instead of alphabetically.
Falls back to the current order when there's no active editor or the language is already first.
Tested in the dev build: opened a Python file, ran Configure Snippets, python was at the top; switched to a JS file and JavaScript moved to the top.
Kept this to the reordering only. Happy to add an indicator for the detected language as a follow-up if that's wanted.