Use originating language server to resolve additional completion edits
This commit is contained in:
parent
7a67ec5743
commit
40ce099780
6 changed files with 10 additions and 4 deletions
|
@ -149,6 +149,7 @@ pub struct Completion {
|
|||
pub old_range: Range<Anchor>,
|
||||
pub new_text: String,
|
||||
pub label: CodeLabel,
|
||||
pub server_id: LanguageServerId,
|
||||
pub lsp_completion: lsp::CompletionItem,
|
||||
}
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@ pub fn serialize_completion(completion: &Completion) -> proto::Completion {
|
|||
old_start: Some(serialize_anchor(&completion.old_range.start)),
|
||||
old_end: Some(serialize_anchor(&completion.old_range.end)),
|
||||
new_text: completion.new_text.clone(),
|
||||
server_id: completion.server_id.0 as u64,
|
||||
lsp_completion: serde_json::to_vec(&completion.lsp_completion).unwrap(),
|
||||
}
|
||||
}
|
||||
|
@ -465,6 +466,7 @@ pub async fn deserialize_completion(
|
|||
lsp_completion.filter_text.as_deref(),
|
||||
)
|
||||
}),
|
||||
server_id: LanguageServerId(completion.server_id as usize),
|
||||
lsp_completion,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue