Skip to content

"Configure Snippets" should list relevant files first #324336

Description

@wjandrea

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions