cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Support context-specific snippet definitions

Open pokey opened this issue 3 years ago • 0 comments

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)

pokey avatar Jun 29 '22 16:06 pokey