jdtsmith / vertico-truncate

Judicious truncation for long vertico lines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vertico-truncate

Judicious truncation for long candidates in vertico completion.

Left-truncates completion lines in vertico for two one situations:

  1. Longer files, which would otherwise move the suffix over (e.g. marginalia data), are left-truncated to avoid this.
  2. Update: this part is no longer functioning and the solution it uses is too hacky to continue supporting. Please open an issue over on consult if you want this functionality. consult-line and consult-*grep matches on long lines are left-truncated to ensure the first match (from grep or the completion style) remains visible. You may also consider increasing consult-grep-max-columns (and, potentially, altering consult-ripgrep-args --max-columns flag if that affects you). Note that VERY long lines (above a few thousand chars) can have a negative performance impact in Emacs.

Others may be considered.

Installation/usage

Install using straight, use-package with load-path, etc. To enable, simply arrange to call (vertico-truncate-mode 1) in your init.

About

Judicious truncation for long vertico lines

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%