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

fix: Fix snippets being placed leftwards of where they should be #16579

Conversation

DropDemBits
Copy link
Contributor

Snippet bits were being escaped before placing snippets, shifting snippets leftwards. Snippets were also being shifted leftwards on files with CRLF line endings since they were placed done after the Unix -> DOS line ending conversion.

Hoping this fixes all of the little bugs related to snippet rendering 😅

The eventual LSP representation looks like it will diverge from RA's representation of `SnippetTextEdit`s, so this'll make it easier to transition to the LSP representation later.
Done so that we don't shift the range that we insert the snippet at.
These are used in placeholder snippets, which may occur elsewhere in the insert text.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2024
@Veykril
Copy link
Member

Veykril commented Feb 16, 2024

Thanks!
bors r+

@DropDemBits
Copy link
Contributor Author

@Veykril Whoops, bors didn't run (forgot the @).

@Veykril
Copy link
Member

Veykril commented Feb 16, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 16, 2024

📌 Commit e8457bb has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 16, 2024

⌛ Testing commit e8457bb with merge ac998a7...

@bors
Copy link
Collaborator

bors commented Feb 16, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing ac998a7 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants