Skip to content

"Configure Snippets" should list relevant files first #324336

Closed as not planned

Description

When I want to configure snippets, usually it's for the language I'm currently working in, however, in the quick pick menu, I either have to search for the language or scroll down to it. How about automating that by putting the current language at the top of the list?

I don't use global snippets myself, but from what I understand, they could be equally relevant, so they should probably be listed immediately after. How about giving this lot their own section, something like "applicable snippets"?

Here's how it currently looks:
Screenshot

And here's a mockup of how I would like it to look, if I'm working on a Python script for example:
Mockup showing 'applicable snippets' with 'python.json' listed first then user snippets and workspace snippets

Other cases:

  • If no snippet file already exists for the current language, it would be nice to put a prompt to create one at the top of the list, but maybe it would make more sense to put the prompt at the top of the "new snippets" list instead
  • If no language is selected, that's considered "plain text" so that's the entry that would show in the menu

For reference, the command is: Snippets: Configure Snippets (workbench.action.openSnippets)

Previously posted on Stack Overflow: Is there a quick way to edit snippets for the current language?

Activity

  1. dobbydobap commented on Jul 5, 2026

    @dobbydobap
    Contributor

    Hey!, I'd like to take this if a PR is welcome. Looking at configureSnippets.ts, the picker already sorts existing files and new-language entries as separate groups , the active editor's language could be ranked first in both, so with e.g. a Python file open, python.json shows at the top. Martin Aeschlimann (@aeschli) would that approach be ok?

  2. wjandrea commented on Jul 5, 2026

    @wjandrea
    Author

    the active editor's language could be ranked first in both, so with e.g. a Python file open, python.json shows at the top.

    That sounds good to me :)

    It seems like global snippets are already ranked first, so it would go above them.

    You might want to add a little indicator in the right margin, like maybe an asterisk with hover text like "This file type was detected from the current file."

  3. vs-code-engineering commented on Jul 6, 2026

    @vs-code-engineering
    Contributor

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  4. dobbydobap commented on Jul 6, 2026

    @dobbydobap
    Contributor

    Added the indicator you suggested the detected language now shows a * with hover text "This file type was detected from the current file." Also added a unit test for the ordering.

  5. wjandrea commented on Jul 9, 2026

    @wjandrea
    Author

    varshitha (@dobbydobap) Hey please upvote this issue to try to keep it in the backlog

  6. vs-code-engineering commented on Aug 26, 2026

    @vs-code-engineering
    Contributor

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  7. vs-code-engineering commented on Sep 6, 2026

    @vs-code-engineering
    Contributor

    🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions