Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

File name column takes to much space (even truncated with custom code).) #437

Closed
gety9 opened this issue Feb 4, 2024 · 0 comments
Closed

Comments

@gety9
Copy link

gety9 commented Feb 4, 2024

Title. This issue was discussed before. I applied suggested custom code. It visually truncated length of line name, but file name column still ocupies lots of space.

Screen shots
Buffers section has correct column width
Screenshot_20240204-111814

But when you scroll to files it worsens
Screenshot_20240204-111826

And at bottom (files section) hardly visible
Screenshot_20240204-111840

Config

(use-package consult
  :config
  (consult-customize
    consult-buffer :preview-key ">"
    consult-line   :preview-key ">"))

(use-package embark
  :demand t)
(use-package embark-consult)

(defun my/vertico-truncate-candidates (args)
  (if-let ((arg (car args))
           (type (get-text-property 0 'multi-category arg))
           ((eq (car-safe type) 'file))
           (w (max 25 (- (window-width) 55)))
           (l (length arg))
           ((> l w)))
      (setcar args (concat "…" (truncate-string-to-width arg l (- l w)))))
  args)
(advice-add #'vertico--format-candidate :filter-args #'my/vertico-truncate-candidates)
(use-package vertico
  :init
  (vertico-mode))

(use-package marginalia
  :init
  (marginalia-mode))

(use-package orderless
  :demand t
  :init
  (setq completion-styles '(orderless)
    read-file-name-completion-ignore-case t
    read-buffer-completion-ignore-case t
    completion-ignore-case t))�
Repository owner locked and limited conversation to collaborators Feb 4, 2024
@minad minad converted this issue into discussion #438 Feb 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant