Bankrupt: Vertico posframe, consult project buffer

This commit is contained in:
Joseph Ferano 2022-08-24 16:50:56 +07:00
parent 4163eb4053
commit 3defc536df

View File

@ -269,7 +269,8 @@ Setup other stuff
(add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode) (add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode)
(global-set-key [remap list-buffers] 'ibuffer) (global-set-key [remap list-buffers] 'ibuffer)
(global-set-key (kbd "C-x B") 'ibuffer) (global-set-key (kbd "C-x B") 'ibuffer)
(global-set-key (kbd "C-x C-b") 'switch-to-buffer) (global-set-key (kbd "C-x C-b") 'consult-project-buffer)
(global-set-key (kbd "C-x C-M-b") 'consult-buffer)
(defun joe/switch-other-buffer () (defun joe/switch-other-buffer ()
"Switch to other buffer" "Switch to other buffer"
@ -319,10 +320,25 @@ Vertico Embark Marginalia Consult Orderless
;; ("\M-G" . vertico-multiform-mode) ;; ("\M-G" . vertico-multiform-mode)
;; ("\M-e" . embark-act))) ;; ("\M-e" . embark-act)))
(vertico-mode) (vertico-mode)
(vertico-reverse-mode) (straight-use-package 'vertico-posframe)
(vertico-posframe-mode t)
(setq vertico-posframe-parameters
'((left-fringe . 100)
(right-fringe . 100)))
(setq vertico-posframe-border-width 5)
(setq vertico-posframe-min-height 20)
(defun posframe-poshandler-slightly-below-top (info)
(cons (/ (- (plist-get info :parent-frame-width)
(plist-get info :posframe-width))
2)
150))
(setq vertico-posframe-poshandler #'posframe-poshandler-slightly-below-top)
(setq vertico-count 17 (setq vertico-count 17
vertico-resize t vertico-resize nil
vertico-cycle t) vertico-cycle t)
(require 'savehist) (require 'savehist)
@ -346,7 +362,6 @@ Vertico Embark Marginalia Consult Orderless
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup)
(straight-use-package 'consult) (straight-use-package 'consult)
(global-set-key (kbd "C-x b") #'consult-buffer)
(straight-use-package 'orderless) (straight-use-package 'orderless)
(setq completion-styles '(orderless basic) (setq completion-styles '(orderless basic)
completion-category-overrides '((file (styles basic partial-completion)))) completion-category-overrides '((file (styles basic partial-completion))))
@ -414,6 +429,7 @@ Vertico Embark Marginalia Consult Orderless
#+end_src #+end_src
** Which Key ** Which Key
#+begin_src emacs-lisp #+begin_src emacs-lisp
(straight-use-package 'which-key) (straight-use-package 'which-key)
(setq which-key-idle-delay 0.3) (setq which-key-idle-delay 0.3)
@ -691,10 +707,6 @@ The best git porcelain/client I've ever used
(straight-use-package 'restclient) (straight-use-package 'restclient)
#+end_src #+end_src
** Finish up
#+begin_src emacs-lisp
#+end_src
* COMMENT Local variables * COMMENT Local variables
;; Local Variables: ;; Local Variables: