Implemented functions and aliases

This commit is contained in:
2025-03-02 22:49:36 -05:00
parent a9a9642a2a
commit 5dd9ee96ad
20 changed files with 424 additions and 95 deletions

View File

@@ -54,7 +54,7 @@ pub struct SynHint {
impl SynHint {
pub fn new(text: String) -> Self {
let styled = style_text(&text, Style::BrightBlack);
let styled = (&text).styled(Style::BrightBlack);
Self { text, styled }
}
pub fn empty() -> Self {
@@ -78,7 +78,6 @@ impl Hint for SynHint {
impl<'a> Hinter for SynHelper<'a> {
type Hint = SynHint;
fn hint(&self, line: &str, pos: usize, ctx: &rustyline::Context<'_>) -> Option<Self::Hint> {
return Some(SynHint::empty());
if line.is_empty() {
return None
}