From d04faa076b1d32db0bdf1adc9887ee25341556fc Mon Sep 17 00:00:00 2001 From: mattiasdrp Date: Thu, 5 Sep 2024 12:16:08 +0200 Subject: [PATCH] Fix posframe being used while not being loaded --- custom.el | 14 -------------- init.el | 17 +++++++++++++++++ init.org | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/custom.el b/custom.el index 19262d8..4269dea 100644 --- a/custom.el +++ b/custom.el @@ -84,20 +84,6 @@ '(use-visual-fill t) '(use-web t) '(use-window-purpose nil) - '(vertico-multiform-categories - '((imenu buffer) (file (vertico-sort-function . sort-directories-first)) - (corfu (vertico-sort-function . vertico-sort-alpha)) - (jinx grid (vertico-grid-annotate . 20)) - (symbol (vertico-sort-function . vertico-sort-history-length-alpha)))) - '(vertico-multiform-commands - '((consult-imenu buffer) (consult-line buffer) (execute-extended-command mouse) - (find-file (vertico-sort-function . sort-directories-first)) - (insert-char (vertico-sort-function . sort-characters)) - (describe-symbol (vertico-sort-override-function . vertico-sort-alpha)) - (posframe - (vertico-posframe-poshandler . posframe-poshandler-frame-top-center) - (vertico-posframe-border-width . 10)) - (t posframe))) '(warning-suppress-types '((comp))) '(x-stretch-cursor nil)) diff --git a/init.el b/init.el index e88e6fa..69d94b6 100644 --- a/init.el +++ b/init.el @@ -2237,6 +2237,23 @@ with a prefix ARG." (nconc (vertico-sort-alpha (seq-remove (lambda (x) (string-suffix-p "/" x)) files)) (vertico-sort-alpha (seq-filter (lambda (x) (string-suffix-p "/" x)) files)))) + (setq vertico-multiform-categories + '((imenu buffer) (file (vertico-sort-function . sort-directories-first)) + (corfu (vertico-sort-function . vertico-sort-alpha)) + (jinx grid (vertico-grid-annotate . 20)) + (symbol (vertico-sort-function . vertico-sort-history-length-alpha)))) + (setq vertico-multiform-commands + '((consult-imenu buffer) (consult-line buffer) (execute-extended-command mouse) + (find-file (vertico-sort-function . sort-directories-first)) + (insert-char (vertico-sort-function . sort-characters)) + (describe-symbol (vertico-sort-override-function . vertico-sort-alpha)))) + (when use-posframe + (mdrp/appendq! vertico-multiform-commands + '((posframe + (vertico-posframe-poshandler . posframe-poshandler-frame-top-center) + (vertico-posframe-border-width . 10)) + (t posframe)))) + (vertico-multiform-mode) (message "`vertico-multiform loaded")) diff --git a/init.org b/init.org index 8b89c56..a1b40eb 100644 --- a/init.org +++ b/init.org @@ -3613,6 +3613,23 @@ TODO: Test all the possible minibuffers and customize them as I'd like them to b (nconc (vertico-sort-alpha (seq-remove (lambda (x) (string-suffix-p "/" x)) files)) (vertico-sort-alpha (seq-filter (lambda (x) (string-suffix-p "/" x)) files)))) + (setq vertico-multiform-categories + '((imenu buffer) (file (vertico-sort-function . sort-directories-first)) + (corfu (vertico-sort-function . vertico-sort-alpha)) + (jinx grid (vertico-grid-annotate . 20)) + (symbol (vertico-sort-function . vertico-sort-history-length-alpha)))) + (setq vertico-multiform-commands + '((consult-imenu buffer) (consult-line buffer) (execute-extended-command mouse) + (find-file (vertico-sort-function . sort-directories-first)) + (insert-char (vertico-sort-function . sort-characters)) + (describe-symbol (vertico-sort-override-function . vertico-sort-alpha)))) + (when use-posframe + (mdrp/appendq! vertico-multiform-commands + '((posframe + (vertico-posframe-poshandler . posframe-poshandler-frame-top-center) + (vertico-posframe-border-width . 10)) + (t posframe)))) + (vertico-multiform-mode) (message "`vertico-multiform loaded"))