Skip to content

Commit

Permalink
Fix posframe being used while not being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasdrp committed Sep 5, 2024
1 parent 92127dd commit d04faa0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
14 changes: 0 additions & 14 deletions custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
17 changes: 17 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down
17 changes: 17 additions & 0 deletions init.org
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down

0 comments on commit d04faa0

Please sign in to comment.