pub enum CompletionContext {
LineStart,
AfterDate,
ExpectingAccount,
AccountSegment {
prefix: String,
},
ExpectingCurrency,
InsideString,
Tag,
Link,
Unknown,
}Expand description
Completion context detected from cursor position.
This is the LSP superset (the WASM editor previously lacked the
Tag/Link variants; it now gains them through this crate).
Variants§
LineStart
At the start of a line (expecting date or directive).
AfterDate
After a date (expecting directive keyword or flag).
ExpectingAccount
After directive keyword (expecting account).
AccountSegment
Inside an account name (after colon).
ExpectingCurrency
After an amount (expecting currency).
InsideString
Inside a string (payee/narration).
Tag
Typing a tag (after #) on a transaction header or in
pushtag/poptag.
Link
Typing a link (after ^) on a transaction header.
Unknown
Unknown context.
Trait Implementations§
Source§impl Clone for CompletionContext
impl Clone for CompletionContext
Source§fn clone(&self) -> CompletionContext
fn clone(&self) -> CompletionContext
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 moreSource§impl Debug for CompletionContext
impl Debug for CompletionContext
impl Eq for CompletionContext
Source§impl PartialEq for CompletionContext
impl PartialEq for CompletionContext
Source§fn eq(&self, other: &CompletionContext) -> bool
fn eq(&self, other: &CompletionContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompletionContext
Auto Trait Implementations§
impl Freeze for CompletionContext
impl RefUnwindSafe for CompletionContext
impl Send for CompletionContext
impl Sync for CompletionContext
impl Unpin for CompletionContext
impl UnsafeUnpin for CompletionContext
impl UnwindSafe for CompletionContext
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