https://github.com/jdtsmith/vertico-truncate
Judicious truncation for long vertico lines
https://github.com/jdtsmith/vertico-truncate
Last synced: 6 months ago
JSON representation
Judicious truncation for long vertico lines
- Host: GitHub
- URL: https://github.com/jdtsmith/vertico-truncate
- Owner: jdtsmith
- License: gpl-3.0
- Created: 2023-02-23T23:18:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T03:17:22.000Z (about 2 years ago)
- Last Synced: 2023-12-26T04:23:03.335Z (about 2 years ago)
- Language: Emacs Lisp
- Size: 33.2 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vertico-truncate
Judicious truncation for long candidates in [vertico](https://github.com/minad/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.