pub enum LexSemanticTokenKind {
Show 31 variants
DocumentTitle,
SessionMarker,
SessionTitleText,
DefinitionSubject,
DefinitionContent,
ListMarker,
ListItemText,
AnnotationLabel,
AnnotationParameter,
AnnotationContent,
InlineStrong,
InlineEmphasis,
InlineCode,
InlineMath,
Reference,
ReferenceCitation,
ReferenceFootnote,
VerbatimSubject,
VerbatimLanguage,
VerbatimAttribute,
VerbatimContent,
InlineMarkerStrongStart,
InlineMarkerStrongEnd,
InlineMarkerEmphasisStart,
InlineMarkerEmphasisEnd,
InlineMarkerCodeStart,
InlineMarkerCodeEnd,
InlineMarkerMathStart,
InlineMarkerMathEnd,
InlineMarkerRefStart,
InlineMarkerRefEnd,
}Variants§
DocumentTitle
SessionMarker
SessionTitleText
DefinitionSubject
DefinitionContent
ListMarker
ListItemText
AnnotationLabel
AnnotationParameter
AnnotationContent
InlineStrong
InlineEmphasis
InlineCode
InlineMath
Reference
ReferenceCitation
ReferenceFootnote
VerbatimSubject
VerbatimLanguage
VerbatimAttribute
VerbatimContent
InlineMarkerStrongStart
InlineMarkerStrongEnd
InlineMarkerEmphasisStart
InlineMarkerEmphasisEnd
InlineMarkerCodeStart
InlineMarkerCodeEnd
InlineMarkerMathStart
InlineMarkerMathEnd
InlineMarkerRefStart
InlineMarkerRefEnd
Implementations§
Source§impl LexSemanticTokenKind
impl LexSemanticTokenKind
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the semantic token type string for LSP.
These token type names are mapped to standard TextMate scopes in editor configurations to ensure compatibility with existing themes (Neovim, VSCode, etc.).
Mapping rationale (based on Lex↔Markdown mapping from lex-babel):
- Session → Heading → maps to “markup.heading”
- Definition → Term: Desc → maps to “variable.other.definition”
- InlineStrong → bold → maps to “markup.bold”
- InlineEmphasis → italic → maps to “markup.italic”
- InlineCode →
code→ maps to “markup.inline.raw” - InlineMath → $math$ → maps to “constant.numeric”
- Reference → [citation] → maps to “markup.underline.link”
- Verbatim →
block→ maps to “markup.raw.block” - Annotation → → maps to “comment.block”
- ListMarker → - or 1. → maps to “punctuation.definition.list”
Trait Implementations§
Source§impl Clone for LexSemanticTokenKind
impl Clone for LexSemanticTokenKind
Source§fn clone(&self) -> LexSemanticTokenKind
fn clone(&self) -> LexSemanticTokenKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LexSemanticTokenKind
impl Debug for LexSemanticTokenKind
Source§impl Hash for LexSemanticTokenKind
impl Hash for LexSemanticTokenKind
Source§impl PartialEq for LexSemanticTokenKind
impl PartialEq for LexSemanticTokenKind
impl Copy for LexSemanticTokenKind
impl Eq for LexSemanticTokenKind
impl StructuralPartialEq for LexSemanticTokenKind
Auto Trait Implementations§
impl Freeze for LexSemanticTokenKind
impl RefUnwindSafe for LexSemanticTokenKind
impl Send for LexSemanticTokenKind
impl Sync for LexSemanticTokenKind
impl Unpin for LexSemanticTokenKind
impl UnsafeUnpin for LexSemanticTokenKind
impl UnwindSafe for LexSemanticTokenKind
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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