Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

typescript: Highlight variables and enums in completions, add details (#9873)

Piotr Osiewicz044b516d98da
diff --git a/crates/languages/src/typescript.rs b/crates/languages/src/typescript.rs
index cc7a89f399a..a05e33641d0 100644
--- a/crates/languages/src/typescript.rs
+++ b/crates/languages/src/typescript.rs
@@ -143,11 +143,12 @@ impl LspAdapter for TypeScriptLspAdapter {
let len = item.label.len();
let grammar = language.grammar()?;
let highlight_id = match item.kind? {
- Kind::CLASS | Kind::INTERFACE => grammar.highlight_id_for_name("type"),
+ Kind::CLASS | Kind::INTERFACE | Kind::ENUM => grammar.highlight_id_for_name("type"),
Kind::CONSTRUCTOR => grammar.highlight_id_for_name("type"),
Kind::CONSTANT => grammar.highlight_id_for_name("constant"),
Kind::FUNCTION | Kind::METHOD => grammar.highlight_id_for_name("function"),
Kind::PROPERTY | Kind::FIELD => grammar.highlight_id_for_name("property"),
+ Kind::VARIABLE => grammar.highlight_id_for_name("variable"),
_ => None,
}?;