Avoid treating snippet completions' details as their variable types

This commit is contained in:
Max Brunsfeld 2023-04-24 16:09:12 -07:00
parent b76194db97
commit dd3f6ff4ca

View file

@ -133,7 +133,8 @@ impl LspAdapter for RustLspAdapter {
});
}
Some(lsp::CompletionItemKind::CONSTANT | lsp::CompletionItemKind::VARIABLE)
if completion.detail.is_some() =>
if completion.detail.is_some()
&& completion.insert_text_format != Some(lsp::InsertTextFormat::SNIPPET) =>
{
let detail = completion.detail.as_ref().unwrap();
let name = &completion.label;