pub struct MagitHunkContextLines;Expand description
Unchanged lines of context around each hunk in the diffs magit
generates — git diff -U<n>. Default 3, which is git’s own.
Distinct from ui.diff.context, which is how much context a
fold leaves visible inside a two-pane diff session. This one
decides how much context git puts in the patch text to begin
with; that one decides how much of an existing diff stays
unfolded.
D in a diff buffer overrides it for that view (MG.23k). The
override wins: this is the default for views that have not been
told otherwise, not a floor.
Implementations§
Source§impl MagitHunkContextLines
impl MagitHunkContextLines
Sourcepub fn build_spec() -> Option<i64>
pub fn build_spec() -> Option<i64>
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 MagitHunkContextLines
impl HasGroup for MagitHunkContextLines
Source§const GROUP_NAME: &'static str = <lattice_config::Magit as ::lattice_config::OptionGroup>::NAME
const GROUP_NAME: &'static str = <lattice_config::Magit 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 MagitHunkContextLines
impl OptionDecl for MagitHunkContextLines
Source§const NAME: &'static str = MagitHunkContextLines
const NAME: &'static str = MagitHunkContextLines
: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 = MagitHunkContextLines
const DOC: &'static str = MagitHunkContextLines
: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 = i64
type Value = i64
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 MagitHunkContextLines
impl RefUnwindSafe for MagitHunkContextLines
impl Send for MagitHunkContextLines
impl Sync for MagitHunkContextLines
impl Unpin for MagitHunkContextLines
impl UnsafeUnpin for MagitHunkContextLines
impl UnwindSafe for MagitHunkContextLines
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