Skip to content

Support context-specific snippet definitions #802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
pokey opened this issue Jun 29, 2022 · 0 comments · Fixed by #1487
Closed
2 tasks done

Support context-specific snippet definitions #802

pokey opened this issue Jun 29, 2022 · 0 comments · Fixed by #1487
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Member

pokey commented Jun 29, 2022

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant