diff options
author | ivan770 <[email protected]> | 2021-03-11 16:14:41 +0000 |
---|---|---|
committer | ivan770 <[email protected]> | 2021-03-14 16:53:37 +0000 |
commit | 71a97a2d8c30fc4061a545f1e2db10e3559eae36 (patch) | |
tree | 1aa0a643c44d1068b915614e374b0ce71deeade4 /crates/rust-analyzer | |
parent | af8440b84851febd805b6b774bfb326cbdb7175e (diff) |
Provide regions in file structure
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index d415ed4d3..e88818eb0 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -60,6 +60,7 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind { | |||
60 | | SymbolKind::ValueParam | 60 | | SymbolKind::ValueParam |
61 | | SymbolKind::Label => lsp_types::SymbolKind::Variable, | 61 | | SymbolKind::Label => lsp_types::SymbolKind::Variable, |
62 | SymbolKind::Union => lsp_types::SymbolKind::Struct, | 62 | SymbolKind::Union => lsp_types::SymbolKind::Struct, |
63 | SymbolKind::Region => lsp_types::SymbolKind::Namespace, | ||
63 | } | 64 | } |
64 | } | 65 | } |
65 | 66 | ||
@@ -117,6 +118,7 @@ pub(crate) fn completion_item_kind( | |||
117 | SymbolKind::Local => lsp_types::CompletionItemKind::Variable, | 118 | SymbolKind::Local => lsp_types::CompletionItemKind::Variable, |
118 | SymbolKind::Macro => lsp_types::CompletionItemKind::Method, | 119 | SymbolKind::Macro => lsp_types::CompletionItemKind::Method, |
119 | SymbolKind::Module => lsp_types::CompletionItemKind::Module, | 120 | SymbolKind::Module => lsp_types::CompletionItemKind::Module, |
121 | SymbolKind::Region => lsp_types::CompletionItemKind::Keyword, | ||
120 | SymbolKind::SelfParam => lsp_types::CompletionItemKind::Value, | 122 | SymbolKind::SelfParam => lsp_types::CompletionItemKind::Value, |
121 | SymbolKind::Static => lsp_types::CompletionItemKind::Value, | 123 | SymbolKind::Static => lsp_types::CompletionItemKind::Value, |
122 | SymbolKind::Struct => lsp_types::CompletionItemKind::Struct, | 124 | SymbolKind::Struct => lsp_types::CompletionItemKind::Struct, |
@@ -428,6 +430,7 @@ fn semantic_token_type_and_modifiers( | |||
428 | SymbolKind::TypeAlias => semantic_tokens::TYPE_ALIAS, | 430 | SymbolKind::TypeAlias => semantic_tokens::TYPE_ALIAS, |
429 | SymbolKind::Trait => lsp_types::SemanticTokenType::INTERFACE, | 431 | SymbolKind::Trait => lsp_types::SemanticTokenType::INTERFACE, |
430 | SymbolKind::Macro => lsp_types::SemanticTokenType::MACRO, | 432 | SymbolKind::Macro => lsp_types::SemanticTokenType::MACRO, |
433 | SymbolKind::Region => lsp_types::SemanticTokenType::NAMESPACE, | ||
431 | }, | 434 | }, |
432 | HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE, | 435 | HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE, |
433 | HlTag::None => semantic_tokens::GENERIC, | 436 | HlTag::None => semantic_tokens::GENERIC, |