diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-18 14:37:22 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-06-23 17:08:04 +0100 |
commit | 351bba9bee136d856f987037b6ecffd0642d606f (patch) | |
tree | 50ef4af147ef3f539086aec02e274655552ee6ef /crates/rust-analyzer/src | |
parent | 0c12c4f9609ee72487af9b55a558b01af73ffe3e (diff) |
Add support for marking doctest items as distinct from normal code, add default tag to all doctest elements
Diffstat (limited to 'crates/rust-analyzer/src')
-rw-r--r-- | crates/rust-analyzer/src/semantic_tokens.rs | 1 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index 2ea63d33b..6f43667a3 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -68,6 +68,7 @@ macro_rules! define_semantic_token_modifiers { | |||
68 | define_semantic_token_modifiers![ | 68 | define_semantic_token_modifiers![ |
69 | (CONSTANT, "constant"), | 69 | (CONSTANT, "constant"), |
70 | (CONTROL_FLOW, "controlFlow"), | 70 | (CONTROL_FLOW, "controlFlow"), |
71 | (INJECTED, "injected"), | ||
71 | (MUTABLE, "mutable"), | 72 | (MUTABLE, "mutable"), |
72 | (UNSAFE, "unsafe"), | 73 | (UNSAFE, "unsafe"), |
73 | (ATTRIBUTE_MODIFIER, "attribute"), | 74 | (ATTRIBUTE_MODIFIER, "attribute"), |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 7b45b169d..dee5d7859 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -331,6 +331,7 @@ fn semantic_token_type_and_modifiers( | |||
331 | HighlightModifier::Attribute => semantic_tokens::ATTRIBUTE_MODIFIER, | 331 | HighlightModifier::Attribute => semantic_tokens::ATTRIBUTE_MODIFIER, |
332 | HighlightModifier::Definition => lsp_types::SemanticTokenModifier::DECLARATION, | 332 | HighlightModifier::Definition => lsp_types::SemanticTokenModifier::DECLARATION, |
333 | HighlightModifier::Documentation => lsp_types::SemanticTokenModifier::DOCUMENTATION, | 333 | HighlightModifier::Documentation => lsp_types::SemanticTokenModifier::DOCUMENTATION, |
334 | HighlightModifier::Injected => semantic_tokens::INJECTED, | ||
334 | HighlightModifier::ControlFlow => semantic_tokens::CONTROL_FLOW, | 335 | HighlightModifier::ControlFlow => semantic_tokens::CONTROL_FLOW, |
335 | HighlightModifier::Mutable => semantic_tokens::MUTABLE, | 336 | HighlightModifier::Mutable => semantic_tokens::MUTABLE, |
336 | HighlightModifier::Unsafe => semantic_tokens::UNSAFE, | 337 | HighlightModifier::Unsafe => semantic_tokens::UNSAFE, |