Provide regions in file structure

This commit is contained in:
ivan770 2021-03-11 18:14:41 +02:00
parent af8440b848
commit 71a97a2d8c
No known key found for this signature in database
GPG key ID: D8C4BD5AE4D9CC4D
5 changed files with 55 additions and 4 deletions

View file

@ -60,6 +60,7 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
| SymbolKind::ValueParam
| SymbolKind::Label => lsp_types::SymbolKind::Variable,
SymbolKind::Union => lsp_types::SymbolKind::Struct,
SymbolKind::Region => lsp_types::SymbolKind::Namespace,
}
}
@ -117,6 +118,7 @@ pub(crate) fn completion_item_kind(
SymbolKind::Local => lsp_types::CompletionItemKind::Variable,
SymbolKind::Macro => lsp_types::CompletionItemKind::Method,
SymbolKind::Module => lsp_types::CompletionItemKind::Module,
SymbolKind::Region => lsp_types::CompletionItemKind::Keyword,
SymbolKind::SelfParam => lsp_types::CompletionItemKind::Value,
SymbolKind::Static => lsp_types::CompletionItemKind::Value,
SymbolKind::Struct => lsp_types::CompletionItemKind::Struct,
@ -428,6 +430,7 @@ fn semantic_token_type_and_modifiers(
SymbolKind::TypeAlias => semantic_tokens::TYPE_ALIAS,
SymbolKind::Trait => lsp_types::SemanticTokenType::INTERFACE,
SymbolKind::Macro => lsp_types::SemanticTokenType::MACRO,
SymbolKind::Region => lsp_types::SemanticTokenType::NAMESPACE,
},
HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE,
HlTag::None => semantic_tokens::GENERIC,