Skip to content

Support context-specific snippet definitions #802

@pokey

Description

@pokey

We currently support specifying the scopes in which a particular snippet definition is active but this is not yet implemented. We would like to implement this.

Note that we cannot support this until we have #785.

  • To make this useful, we will need to stop returning the first matching definition we find, and instead prefer snippets that have more specific contexts. Specifically, snippets that match a scope should have higher precedence than snippets that only match on language id, which should in turn have higher precedence than ones that have no language id.
  • We need to think about how this interacts with user snippets overriding core / third-party snippets. Eg if user's snippet is less specific, should it still override a core snippet that is more specific? (probably not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions