mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Make punctuation highlighting configurable, disable it by default
This commit is contained in:
parent
6627b473e2
commit
16315edaee
4 changed files with 56 additions and 13 deletions
|
@ -296,7 +296,7 @@ impl Highlight {
|
|||
Highlight { tag, mods: HlMods::default() }
|
||||
}
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.tag == HlTag::None && self.mods == HlMods::default()
|
||||
self.tag == HlTag::None && self.mods.is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -330,6 +330,10 @@ impl ops::BitOr<HlMod> for Highlight {
|
|||
}
|
||||
|
||||
impl HlMods {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0 == 0
|
||||
}
|
||||
|
||||
pub fn contains(self, m: HlMod) -> bool {
|
||||
self.0 & m.mask() == m.mask()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue