Skip to content
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

internal: Defer structured snippet rendering to allow escaping snippet bits #15269

Merged

Commits on Jul 12, 2023

  1. Add SnippetEdit to be alongside source changes

    Rendering of snippet edits is deferred to places using source change
    DropDemBits committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    89f7bf7 View commit details
    Browse the repository at this point in the history
  2. internal: Defer rendering of structured snippets

    This ensures that any assist using structured snippets won't
    accidentally remove bits interpreted as snippet bits.
    DropDemBits committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    97a6fa5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae83f32 View commit details
    Browse the repository at this point in the history
  4. Simplify snippet rendering

    Also makes sure that stray placeholders get converted into tabstops
    DropDemBits committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    a3a02d0 View commit details
    Browse the repository at this point in the history
  5. Passthrough is_snippet for non-structured snippets

    Structured snippets precisely track which text edits need to be marked
    as snippet text edits, but the cases where structured snippets aren't
    used but snippets are still present are for simple single text-edit
    changes, so it's perfectly fine to mark all one of them as being a
    snippet text edit
    DropDemBits committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    a1877df View commit details
    Browse the repository at this point in the history
  6. Test rendering of snippets

    Had a missing ':' between the snippet index and placeholder text
    DropDemBits committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    614987a View commit details
    Browse the repository at this point in the history