Skip to content

attempt to implement as-you-type style for corfu-preview-current #560

@dwuggh

Description

@dwuggh

Hi, I'm trying to implement corfu-candidate-overlay-like preview styles. Since we already have corfu-preview-current now, I only need to change the text properties(cursor and face) in the overlay. as in #331 , you mention that you didn't manage to achieve acceptable performance. I wonder the status of performance now, I think company-preview-frontend does the pretty same thing, updating the overlay on every keystroke.

In corfu, the preview flickers at first, but it seems to be a redisplay issue instead of performance. the code deletes overlay in pre-command-hook and then force redisplay before the new overlay is computed. Commenting out the following code eliminates the flickering, and I don't feel any lags during these days of usage.

corfu/corfu.el

Line 705 in c302b05

(when interruptible (redisplay))

It is related to #48. Could this be further optimized? maybe by changing the overlay update logic? or add another option here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions