Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighter::highlight_candidate() candidate argument should be Completer::Candidate #642

Open
tobiasvl opened this issue Jul 18, 2022 · 1 comment

Comments

@tobiasvl
Copy link

See FIXME comment here:

candidate: &'c str, // FIXME should be Completer::Candidate

What's the reason this isn't fixed? Can it be fixed?

I had to work around this and highlight the candidates in Completer::complete() instead.

@gwenn
Copy link
Collaborator

gwenn commented Jul 19, 2022

I guess it can be fixed but not easily.
See #427, #207.

pub trait Helper {
    type Document;
    type Candidate: Candidate;
    
    fn lexer(&self) -> Option<&dyn Lexer<Self::Document>> { None }
    fn hinter(&self) -> Option<&dyn Hinter<Self::Document>> { None }
    fn highlighter(&self) -> Option<&dyn Highlighter<Self::Document, Self::Candidate>> { None }
    fn validator(&self) -> Option<&dyn Validator<Self::Document>> { None }
    fn completer(&self) -> Option<&dyn Completer<Self::Document, Self::Candidate>> { None }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants