pub struct SyntaxContext {
pub lang: Lang,
pub registry: Arc<LangRegistry>,
pub resolved: Arc<ResolvedTheme>,
pub ids: BuiltinElementIds,
}Expand description
D.3.b.2 (2026-05-29): the per-session syntax context the
provider needs to populate Cell.fg with theme-resolved
token colours.
The refresh task threads this through from
DiffOverlayRefreshTask::spawn so the provider doesn’t
have to plumb the host’s syntax / theme types into its
public surface. None (passed as syntax: Option<&...>
in DiffOverlayVirtualRowProvider::render_rows) means
“don’t syntax-highlight” — useful for tests and for
languages with no registered grammar.
Fields§
§lang: Lang§registry: Arc<LangRegistry>§resolved: Arc<ResolvedTheme>T.5.b: the resolved theme table + builtin element ids the
deletion-block highlighter resolves syntax colours through
(replaces the old theme: Theme field — the only thing it
was used for was Theme::syntax_style, now
lattice_syntax::resolve_syntax_style).
ids: BuiltinElementIdsTrait Implementations§
Source§impl Clone for SyntaxContext
impl Clone for SyntaxContext
Source§fn clone(&self) -> SyntaxContext
fn clone(&self) -> SyntaxContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SyntaxContext
impl RefUnwindSafe for SyntaxContext
impl Send for SyntaxContext
impl Sync for SyntaxContext
impl Unpin for SyntaxContext
impl UnsafeUnpin for SyntaxContext
impl UnwindSafe for SyntaxContext
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ⓘ
Converts
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> ⓘ
Converts
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