pub struct OrgModeLanguage {
pub todo_keywords: Vec<String>,
pub done_keywords: Vec<String>,
pub strict_mode: bool,
}Expand description
Org-mode language definition.
Fields§
§todo_keywords: Vec<String>TODO keywords list.
done_keywords: Vec<String>DONE keywords list.
strict_mode: boolWhether to enable strict mode.
Implementations§
Source§impl OrgModeLanguage
impl OrgModeLanguage
Sourcepub fn with_todo_keywords(self, keywords: Vec<String>) -> Self
pub fn with_todo_keywords(self, keywords: Vec<String>) -> Self
Sets TODO keywords.
Sourcepub fn with_done_keywords(self, keywords: Vec<String>) -> Self
pub fn with_done_keywords(self, keywords: Vec<String>) -> Self
Sets DONE keywords.
Sourcepub fn with_strict_mode(self, strict: bool) -> Self
pub fn with_strict_mode(self, strict: bool) -> Self
Sets strict mode.
Trait Implementations§
Source§impl Builder<OrgModeLanguage> for OrgModeBuilder
impl Builder<OrgModeLanguage> for OrgModeBuilder
Source§fn build<'a, S: Source + ?Sized>(
&self,
_source: &S,
_edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<OrgModeLanguage>,
) -> OakDiagnostics<()>
fn build<'a, S: Source + ?Sized>( &self, _source: &S, _edits: &[TextEdit], _cache: &'a mut impl BuilderCache<OrgModeLanguage>, ) -> OakDiagnostics<()>
Builds the higher-level structure (typically an AST) from the source text. Read more
Source§impl Clone for OrgModeLanguage
impl Clone for OrgModeLanguage
Source§fn clone(&self) -> OrgModeLanguage
fn clone(&self) -> OrgModeLanguage
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 OrgModeLanguage
impl Debug for OrgModeLanguage
Source§impl Default for OrgModeLanguage
impl Default for OrgModeLanguage
Source§impl HoverProvider<OrgModeLanguage> for OrgModeHoverProvider
Available on crate feature lsp only.
impl HoverProvider<OrgModeLanguage> for OrgModeHoverProvider
Available on crate feature
lsp only.Source§fn hover(
&self,
node: &RedNode<'_, OrgModeLanguage>,
_range: Range<usize>,
) -> Option<ProviderHover>
fn hover( &self, node: &RedNode<'_, OrgModeLanguage>, _range: Range<usize>, ) -> Option<ProviderHover>
Returns hover information at the given range.
Source§impl Language for OrgModeLanguage
impl Language for OrgModeLanguage
Source§const CATEGORY: LanguageCategory = LanguageCategory::Markup
const CATEGORY: LanguageCategory = LanguageCategory::Markup
The category of the language.
Source§type TokenType = OrgModeTokenType
type TokenType = OrgModeTokenType
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = OrgModeElementType
type ElementType = OrgModeElementType
The element type used to represent composite structures in the parsed tree. Read more
Source§impl<'config> Lexer<OrgModeLanguage> for OrgModeLexer<'config>
impl<'config> Lexer<OrgModeLanguage> for OrgModeLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &'a S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<OrgModeLanguage>,
) -> LexOutput<OrgModeLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &'a S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<OrgModeLanguage>, ) -> LexOutput<OrgModeLanguage>
Tokenizes the source text into a sequence of tokens. Read more
Source§impl<'a> Parser<OrgModeLanguage> for OrgModeParser<'a>
impl<'a> Parser<OrgModeLanguage> for OrgModeParser<'a>
Source§fn parse<'b, S: Source + ?Sized>(
&self,
text: &'b S,
edits: &[TextEdit],
cache: &'b mut impl ParseCache<OrgModeLanguage>,
) -> ParseOutput<'b, OrgModeLanguage>
fn parse<'b, S: Source + ?Sized>( &self, text: &'b S, edits: &[TextEdit], cache: &'b mut impl ParseCache<OrgModeLanguage>, ) -> ParseOutput<'b, OrgModeLanguage>
The core parsing entry point for converting tokens into a syntax tree. Read more
Auto Trait Implementations§
impl Freeze for OrgModeLanguage
impl RefUnwindSafe for OrgModeLanguage
impl Send for OrgModeLanguage
impl Sync for OrgModeLanguage
impl Unpin for OrgModeLanguage
impl UnsafeUnpin for OrgModeLanguage
impl UnwindSafe for OrgModeLanguage
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