mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
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 <lukastw97@gmail.com>
This commit is contained in:
commit
0c37b3a0fc
23 changed files with 227 additions and 166 deletions
|
@ -1,10 +1,11 @@
|
|||
//! Syntax highlighting for format macro strings.
|
||||
use ide_db::SymbolKind;
|
||||
use syntax::{
|
||||
ast::{self, FormatSpecifier, HasFormatSpecifier},
|
||||
AstNode, AstToken, TextRange,
|
||||
};
|
||||
|
||||
use crate::{syntax_highlighting::highlights::Highlights, HlRange, HlTag, SymbolKind};
|
||||
use crate::{syntax_highlighting::highlights::Highlights, HlRange, HlTag};
|
||||
|
||||
pub(super) fn highlight_format_string(
|
||||
stack: &mut Highlights,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use hir::{AsAssocItem, Semantics, VariantDef};
|
||||
use ide_db::{
|
||||
defs::{Definition, NameClass, NameRefClass},
|
||||
RootDatabase,
|
||||
RootDatabase, SymbolKind,
|
||||
};
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::{
|
||||
|
@ -12,7 +12,7 @@ use syntax::{
|
|||
SyntaxNode, SyntaxToken, T,
|
||||
};
|
||||
|
||||
use crate::{syntax_highlighting::tags::HlPunct, Highlight, HlMod, HlTag, SymbolKind};
|
||||
use crate::{syntax_highlighting::tags::HlPunct, Highlight, HlMod, HlTag};
|
||||
|
||||
pub(super) fn element(
|
||||
sema: &Semantics<RootDatabase>,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use std::{fmt, ops};
|
||||
|
||||
use crate::SymbolKind;
|
||||
use ide_db::SymbolKind;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct Highlight {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue