pub struct CwdAwareHinter { /* private fields */ }Expand description
A hinter that uses the completions or the history to show a hint to the user
Similar to fish autosuggestions
Implementations§
Source§impl CwdAwareHinter
impl CwdAwareHinter
Sourcepub fn with_style(self, style: Style) -> Self
pub fn with_style(self, style: Style) -> Self
A builder that sets the style applied to the hint as part of the buffer
Sourcepub fn with_min_chars(self, min_chars: usize) -> Self
pub fn with_min_chars(self, min_chars: usize) -> Self
A builder that sets the number of characters that have to be present to enable history hints
Trait Implementations§
Source§impl Default for CwdAwareHinter
impl Default for CwdAwareHinter
Source§impl Hinter for CwdAwareHinter
impl Hinter for CwdAwareHinter
Source§fn handle(
&mut self,
line: &str,
pos: usize,
history: &dyn History,
use_ansi_coloring: bool,
) -> String
fn handle( &mut self, line: &str, pos: usize, history: &dyn History, use_ansi_coloring: bool, ) -> String
Handle the hinting duty by using the line, position, and current history Read more
Source§fn complete_hint(&self) -> String
fn complete_hint(&self) -> String
Return the current hint unformatted to perform the completion of the full hint
Source§fn next_hint_token(&self) -> String
fn next_hint_token(&self) -> String
Return the first semantic token of the hint
for incremental completion
Auto Trait Implementations§
impl Freeze for CwdAwareHinter
impl RefUnwindSafe for CwdAwareHinter
impl Send for CwdAwareHinter
impl Sync for CwdAwareHinter
impl Unpin for CwdAwareHinter
impl UnwindSafe for CwdAwareHinter
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