pub struct Language {
pub name: &'static str,
pub ts_language: Language,
pub highlights_query: &'static str,
pub injections_query: &'static str,
pub locals_query: &'static str,
}Expand description
A language configuration for syntax highlighting.
Fields§
§name: &'static strLanguage name (e.g., “sql”, “rust”, “python”)
ts_language: LanguageTree-sitter language grammar
highlights_query: &'static strHighlight queries (tree-sitter query syntax)
injections_query: &'static strInjection queries (for embedded languages, optional)
locals_query: &'static strLocals queries (for local variable scoping, optional)
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnsafeUnpin for Language
impl UnwindSafe for Language
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> 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