pub struct UiDiffLineBackgrounds;Expand description
Tint whole rows by what the diff did to them — added rows on an
add background, removed rows on a remove background — rather
than colouring only the leading + / -.
true (default) — what MG.21a made unconditional, and what
every diff-showing surface has looked like since.
false — foreground colouring only. For low-contrast themes
where a full-row wash fights the syntax colours underneath, and
for terminals whose background handling makes the tint muddy.
Lives here rather than under magit.*, which is where
MG.22’s design fragment first put it. The mechanism turned out
to be generic: Editor::diff_signs_from_spans derives the tint
from whatever spans a mode publishes, so every diff-showing
buffer shares it, magit’s among them. An option named for one
consumer would have understated what it turns off.
Implementations§
Source§impl UiDiffLineBackgrounds
impl UiDiffLineBackgrounds
Sourcepub fn build_spec() -> Option<bool>
pub fn build_spec() -> Option<bool>
Build the runtime spec for this declaration.
Used by the registry’s self-registration boot
path; not generally called by hand. Direct
construction of Option<T> is the macro’s
internal-only path – consumer code uses
config.get_typed::<#name_ident>() to read
and config.set_typed::<#name_ident>(...) to
write.
Trait Implementations§
Source§impl HasGroup for UiDiffLineBackgrounds
impl HasGroup for UiDiffLineBackgrounds
Source§const GROUP_NAME: &'static str = <lattice_config::Display as ::lattice_config::OptionGroup>::NAME
const GROUP_NAME: &'static str = <lattice_config::Display as ::lattice_config::OptionGroup>::NAME
"editor", "lsp", …). The macro
pulls this from the group = SomeGroup; directive at the
declaration block’s head.Source§impl OptionDecl for UiDiffLineBackgrounds
impl OptionDecl for UiDiffLineBackgrounds
Source§const NAME: &'static str = UiDiffLineBackgrounds
const NAME: &'static str = UiDiffLineBackgrounds
:set <NAME>=…,
TOML keys, completion candidates, :describe-option.
Internal access is type-driven. The macro derives this
from the option’s identifier (with namespace prefix when
declared via mode_options!); manually-typed NAMEs are
not supported for built-in options.Source§const DOC: &'static str = UiDiffLineBackgrounds
const DOC: &'static str = UiDiffLineBackgrounds
:describe-option, the :customize
form’s per-row help, and :apropos results.Source§const CUSTOMIZABLE: bool = true
const CUSTOMIZABLE: bool = true
true (the default) ⇒ option
appears in :set autocomplete + the :customize group
view. false ⇒ plugin / engine-internal state, hidden
from user surfaces. Equivalent of emacs’s defvar vs
defcustom. (See mode-architecture.md §6.5.3.)Source§type Value = bool
type Value = bool
bool, i64, String, plus any
domain enum that impls [OptionType].Source§fn default_value() -> Self::Value
fn default_value() -> Self::Value
const) so non-const-constructible types like String
can be defaults.Auto Trait Implementations§
impl Freeze for UiDiffLineBackgrounds
impl RefUnwindSafe for UiDiffLineBackgrounds
impl Send for UiDiffLineBackgrounds
impl Sync for UiDiffLineBackgrounds
impl Unpin for UiDiffLineBackgrounds
impl UnsafeUnpin for UiDiffLineBackgrounds
impl UnwindSafe for UiDiffLineBackgrounds
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more