Use CompletionTextEdit::InsertAndReplace if supported by the client

This commit is contained in:
Lukas Wirth 2021-04-08 14:22:54 +02:00
parent 3191a93185
commit 8fa3011908
5 changed files with 50 additions and 20 deletions

View file

@ -29,7 +29,7 @@ pub struct CompletionItem {
/// Range of identifier that is being completed.
///
/// It should be used primarily for UI, but we also use this to convert
/// genetic TextEdit into LSP's completion edit (see conv.rs).
/// generic TextEdit into LSP's completion edit (see conv.rs).
///
/// `source_range` must contain the completion offset. `insert_text` should
/// start with what `source_range` points to, or VSCode will filter out the