aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/to_proto.rs
diff options
context:
space:
mode:
authorpetr-tik <[email protected]>2021-02-05 23:46:39 +0000
committerpetr-tik <[email protected]>2021-02-05 23:46:39 +0000
commitf4e3eceb6f9c708cb94ee5e2940c6ad4f3abc629 (patch)
tree4507ec2bc139c08b6d03ad0a774c1a64502299d0 /crates/rust-analyzer/src/to_proto.rs
parent582a202d6ead6d2b793923c8f63801d34c72a448 (diff)
Add a semantic token type for char literals
The LSP spec doesn't recognise character literals, so had to extend the suported types to our own custom type
Diffstat (limited to 'crates/rust-analyzer/src/to_proto.rs')
-rw-r--r--crates/rust-analyzer/src/to_proto.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 96f915f1c..5236932e8 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -426,7 +426,8 @@ fn semantic_token_type_and_modifiers(
426 HlTag::None => semantic_tokens::GENERIC, 426 HlTag::None => semantic_tokens::GENERIC,
427 HlTag::ByteLiteral | HlTag::NumericLiteral => lsp_types::SemanticTokenType::NUMBER, 427 HlTag::ByteLiteral | HlTag::NumericLiteral => lsp_types::SemanticTokenType::NUMBER,
428 HlTag::BoolLiteral => semantic_tokens::BOOLEAN, 428 HlTag::BoolLiteral => semantic_tokens::BOOLEAN,
429 HlTag::CharLiteral | HlTag::StringLiteral => lsp_types::SemanticTokenType::STRING, 429 HlTag::StringLiteral => lsp_types::SemanticTokenType::STRING,
430 HlTag::CharLiteral => semantic_tokens::CHAR_LITERAL,
430 HlTag::Comment => lsp_types::SemanticTokenType::COMMENT, 431 HlTag::Comment => lsp_types::SemanticTokenType::COMMENT,
431 HlTag::Attribute => semantic_tokens::ATTRIBUTE, 432 HlTag::Attribute => semantic_tokens::ATTRIBUTE,
432 HlTag::Keyword => lsp_types::SemanticTokenType::KEYWORD, 433 HlTag::Keyword => lsp_types::SemanticTokenType::KEYWORD,