mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Include Typescript completion item detail
field in completion label
This commit is contained in:
parent
d0ce7b3516
commit
93a634991b
1 changed files with 7 additions and 1 deletions
|
@ -128,8 +128,14 @@ impl LspAdapter for TypeScriptLspAdapter {
|
||||||
Kind::PROPERTY | Kind::FIELD => grammar.highlight_id_for_name("property"),
|
Kind::PROPERTY | Kind::FIELD => grammar.highlight_id_for_name("property"),
|
||||||
_ => None,
|
_ => None,
|
||||||
}?;
|
}?;
|
||||||
|
|
||||||
|
let text = match &item.detail {
|
||||||
|
Some(detail) => format!("{} {}", item.label, detail),
|
||||||
|
None => item.label.clone(),
|
||||||
|
};
|
||||||
|
|
||||||
Some(language::CodeLabel {
|
Some(language::CodeLabel {
|
||||||
text: item.label.clone(),
|
text,
|
||||||
runs: vec![(0..len, highlight_id)],
|
runs: vec![(0..len, highlight_id)],
|
||||||
filter_range: 0..len,
|
filter_range: 0..len,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue