From 8aea99c770b2925a73a497eb8753c7dbc4370481 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Sat, 29 May 2021 16:19:30 +0300 Subject: [PATCH] selectrum: rework setq's for selectrum use-package - display all candidates that fit, displaying only 15 leaves a gap - move all of them to `:init` since they can be there --- modules/completion/selectrum/config.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/completion/selectrum/config.el b/modules/completion/selectrum/config.el index 44c08488e..52bebd46a 100644 --- a/modules/completion/selectrum/config.el +++ b/modules/completion/selectrum/config.el @@ -4,17 +4,15 @@ :hook (doom-first-input . selectrum-mode) :init (setq selectrum-display-action nil - selectrum-num-candidates-displayed 15 - selectrum-extend-current-candidate-highlight t) + selectrum-extend-current-candidate-highlight t + selectrum-fix-vertical-window-height 17 + selectrum-max-window-height 17) (when (featurep! +prescient) (setq completion-styles '(substring partial-completion))) :config - (setq selectrum-fix-vertical-window-height 17 - selectrum-max-window-height 17) (defadvice! +selectrum-refresh-on-cycle (&rest _) :after 'marginalia-cycle (when (bound-and-true-p selectrum-mode) (selectrum-exhibit))) - (defun +selectrum/backward-updir () "Delete char before or go up directory for file cagetory selectrum buffers." (interactive) @@ -27,7 +25,6 @@ (directory-file-name (expand-file-name new-path)))))) (call-interactively 'backward-delete-char))) - (map! :map selectrum-minibuffer-map [backspace] #'+selectrum/backward-updir))