mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Provide regions in file structure
This commit is contained in:
parent
af8440b848
commit
71a97a2d8c
5 changed files with 55 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue