Skip to content

Completion replace not fully replacing when in macro string literal #11020

Discussion options

You must be logged in to vote

this loooks like a rust-analyzer bug. Lsp has two modes of returning completion edits: One simple mode where the lsp has to figure out what text to replace and an explicit mode where the lsp specifies the range.

RA always uses the explicit mode and all the setting does is switch between the two edits. In this case the edit RA provides is simply off by one so it's an off by one bug in rust-analyzer not in helix. Particularly these completions inside derive macros are new so I am not too surprised. It may also be a RA limitation since sered uses string literals.

A better case is you start with a file where the word is partially already written out and enter insertmode (so entirely new compl…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RoloEdits
Comment options

Answer selected by RoloEdits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug upstream
2 participants
Converted from issue

This discussion was converted from issue #11010 on June 22, 2024 16:13.