mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Fix highlighting of Self
This commit is contained in:
parent
c0d6471143
commit
5c0aee013e
9 changed files with 19 additions and 4 deletions
|
@ -190,6 +190,7 @@ fn keyword(
|
|||
T![for] if parent_matches::<ast::ForExpr>(&token) => h | HlMod::ControlFlow,
|
||||
T![unsafe] => h | HlMod::Unsafe,
|
||||
T![true] | T![false] => HlTag::BoolLiteral.into(),
|
||||
T![Self] => return Some(HlTag::Symbol(SymbolKind::SelfType).into()),
|
||||
// crate is handled just as a token if it's in an `extern crate`
|
||||
T![crate] if parent_matches::<ast::ExternCrate>(&token) => h,
|
||||
// self, crate and super are handled as either a Name or NameRef already, unless they
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue