|
|
|
@ -30,31 +30,32 @@ impl menu::Item for CompletionItem {
|
|
|
|
|
menu::Row::new(vec![
|
|
|
|
|
menu::Cell::from(self.label.as_str()),
|
|
|
|
|
menu::Cell::from(match self.kind {
|
|
|
|
|
Some(lsp::CompletionItemKind::Text) => "text",
|
|
|
|
|
Some(lsp::CompletionItemKind::Method) => "method",
|
|
|
|
|
Some(lsp::CompletionItemKind::Function) => "function",
|
|
|
|
|
Some(lsp::CompletionItemKind::Constructor) => "constructor",
|
|
|
|
|
Some(lsp::CompletionItemKind::Field) => "field",
|
|
|
|
|
Some(lsp::CompletionItemKind::Variable) => "variable",
|
|
|
|
|
Some(lsp::CompletionItemKind::Class) => "class",
|
|
|
|
|
Some(lsp::CompletionItemKind::Interface) => "interface",
|
|
|
|
|
Some(lsp::CompletionItemKind::Module) => "module",
|
|
|
|
|
Some(lsp::CompletionItemKind::Property) => "property",
|
|
|
|
|
Some(lsp::CompletionItemKind::Unit) => "unit",
|
|
|
|
|
Some(lsp::CompletionItemKind::Value) => "value",
|
|
|
|
|
Some(lsp::CompletionItemKind::Enum) => "enum",
|
|
|
|
|
Some(lsp::CompletionItemKind::Keyword) => "keyword",
|
|
|
|
|
Some(lsp::CompletionItemKind::Snippet) => "snippet",
|
|
|
|
|
Some(lsp::CompletionItemKind::Color) => "color",
|
|
|
|
|
Some(lsp::CompletionItemKind::File) => "file",
|
|
|
|
|
Some(lsp::CompletionItemKind::Reference) => "reference",
|
|
|
|
|
Some(lsp::CompletionItemKind::Folder) => "folder",
|
|
|
|
|
Some(lsp::CompletionItemKind::EnumMember) => "enum_member",
|
|
|
|
|
Some(lsp::CompletionItemKind::Constant) => "constant",
|
|
|
|
|
Some(lsp::CompletionItemKind::Struct) => "struct",
|
|
|
|
|
Some(lsp::CompletionItemKind::Event) => "event",
|
|
|
|
|
Some(lsp::CompletionItemKind::Operator) => "operator",
|
|
|
|
|
Some(lsp::CompletionItemKind::TypeParameter) => "type_param",
|
|
|
|
|
Some(lsp::CompletionItemKind::TEXT) => "text",
|
|
|
|
|
Some(lsp::CompletionItemKind::METHOD) => "method",
|
|
|
|
|
Some(lsp::CompletionItemKind::FUNCTION) => "function",
|
|
|
|
|
Some(lsp::CompletionItemKind::CONSTRUCTOR) => "constructor",
|
|
|
|
|
Some(lsp::CompletionItemKind::FIELD) => "field",
|
|
|
|
|
Some(lsp::CompletionItemKind::VARIABLE) => "variable",
|
|
|
|
|
Some(lsp::CompletionItemKind::CLASS) => "class",
|
|
|
|
|
Some(lsp::CompletionItemKind::INTERFACE) => "interface",
|
|
|
|
|
Some(lsp::CompletionItemKind::MODULE) => "module",
|
|
|
|
|
Some(lsp::CompletionItemKind::PROPERTY) => "property",
|
|
|
|
|
Some(lsp::CompletionItemKind::UNIT) => "unit",
|
|
|
|
|
Some(lsp::CompletionItemKind::VALUE) => "value",
|
|
|
|
|
Some(lsp::CompletionItemKind::ENUM) => "enum",
|
|
|
|
|
Some(lsp::CompletionItemKind::KEYWORD) => "keyword",
|
|
|
|
|
Some(lsp::CompletionItemKind::SNIPPET) => "snippet",
|
|
|
|
|
Some(lsp::CompletionItemKind::COLOR) => "color",
|
|
|
|
|
Some(lsp::CompletionItemKind::FILE) => "file",
|
|
|
|
|
Some(lsp::CompletionItemKind::REFERENCE) => "reference",
|
|
|
|
|
Some(lsp::CompletionItemKind::FOLDER) => "folder",
|
|
|
|
|
Some(lsp::CompletionItemKind::ENUM_MEMBER) => "enum_member",
|
|
|
|
|
Some(lsp::CompletionItemKind::CONSTANT) => "constant",
|
|
|
|
|
Some(lsp::CompletionItemKind::STRUCT) => "struct",
|
|
|
|
|
Some(lsp::CompletionItemKind::EVENT) => "event",
|
|
|
|
|
Some(lsp::CompletionItemKind::OPERATOR) => "operator",
|
|
|
|
|
Some(lsp::CompletionItemKind::TYPE_PARAMETER) => "type_param",
|
|
|
|
|
Some(kind) => unimplemented!("{:?}", kind),
|
|
|
|
|
None => "",
|
|
|
|
|
}),
|
|
|
|
|
// self.detail.as_deref().unwrap_or("")
|
|
|
|
|