mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Merge #7080
7080: Implement ConstParams for HIR r=Veykril a=Veykril r? @flodiebold Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
0e5fe47153
28 changed files with 238 additions and 41 deletions
|
@ -44,6 +44,7 @@ define_semantic_token_types![
|
|||
(ESCAPE_SEQUENCE, "escapeSequence"),
|
||||
(FORMAT_SPECIFIER, "formatSpecifier"),
|
||||
(GENERIC, "generic"),
|
||||
(CONST_PARAMETER, "constParameter"),
|
||||
(LIFETIME, "lifetime"),
|
||||
(LABEL, "label"),
|
||||
(PUNCTUATION, "punctuation"),
|
||||
|
|
|
@ -42,6 +42,7 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
|
|||
SymbolKind::Field => lsp_types::SymbolKind::Field,
|
||||
SymbolKind::Static => lsp_types::SymbolKind::Constant,
|
||||
SymbolKind::Const => lsp_types::SymbolKind::Constant,
|
||||
SymbolKind::ConstParam => lsp_types::SymbolKind::Constant,
|
||||
SymbolKind::Impl => lsp_types::SymbolKind::Object,
|
||||
SymbolKind::Local
|
||||
| SymbolKind::SelfParam
|
||||
|
@ -378,6 +379,7 @@ fn semantic_token_type_and_modifiers(
|
|||
SymbolKind::Impl => lsp_types::SemanticTokenType::TYPE,
|
||||
SymbolKind::Field => lsp_types::SemanticTokenType::PROPERTY,
|
||||
SymbolKind::TypeParam => lsp_types::SemanticTokenType::TYPE_PARAMETER,
|
||||
SymbolKind::ConstParam => semantic_tokens::CONST_PARAMETER,
|
||||
SymbolKind::LifetimeParam => semantic_tokens::LIFETIME,
|
||||
SymbolKind::Label => semantic_tokens::LABEL,
|
||||
SymbolKind::ValueParam => lsp_types::SemanticTokenType::PARAMETER,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue