diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-22 15:31:47 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-22 15:31:47 +0000 |
commit | 0c37b3a0fc6d62cd1401320c53feb51a58ea09a6 (patch) | |
tree | 3798ba62e958b1c3642c30e4fab13011171b4837 /crates/ide/src/syntax_highlighting.rs | |
parent | a5322e3d5b813e4bce7a73762c14bebbd9a36e01 (diff) | |
parent | 08b822b25914bea7405a30383fe43c7235d14346 (diff) |
Merge #7353
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril
Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there.
`ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better?
Additions were solely inspired by (the single) test output for const params.
Also sorts the variants of `CompletionItemKind` and its to_proto match.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index f2d4da78d..a3d4e4f77 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -13,7 +13,7 @@ mod html; | |||
13 | mod tests; | 13 | mod tests; |
14 | 14 | ||
15 | use hir::{Name, Semantics}; | 15 | use hir::{Name, Semantics}; |
16 | use ide_db::RootDatabase; | 16 | use ide_db::{RootDatabase, SymbolKind}; |
17 | use rustc_hash::FxHashMap; | 17 | use rustc_hash::FxHashMap; |
18 | use syntax::{ | 18 | use syntax::{ |
19 | ast::{self, HasFormatSpecifier}, | 19 | ast::{self, HasFormatSpecifier}, |
@@ -27,7 +27,7 @@ use crate::{ | |||
27 | format::highlight_format_string, highlights::Highlights, | 27 | format::highlight_format_string, highlights::Highlights, |
28 | macro_rules::MacroRulesHighlighter, tags::Highlight, | 28 | macro_rules::MacroRulesHighlighter, tags::Highlight, |
29 | }, | 29 | }, |
30 | FileId, HlMod, HlTag, SymbolKind, | 30 | FileId, HlMod, HlTag, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | pub(crate) use html::highlight_as_html; | 33 | pub(crate) use html::highlight_as_html; |