compleseus: use the correct predicate for minibuffer hjkl bindings

https://github.com/syl20bnr/spacemacs/pull/15710 confused
hybrid-style-enable-evilified-state and hybrid-style-enable-hjkl-bindings
This commit is contained in:
Atemu 2022-08-27 13:02:16 +02:00 committed by Maxi Wolff
parent 1ed08595bf
commit 201d22bcc9
2 changed files with 10 additions and 4 deletions

View file

@ -199,11 +199,17 @@ in `dotspacemacs-themes'.")
'spacemacs-dotspacemacs-init)
(defun spacemacs//support-evilified-buffer-p ()
"Return non-nil if evil navigation should be enabled."
"Returns non-nil if buffers should use evilified states."
(or (eq dotspacemacs-editing-style 'vim)
(and (eq dotspacemacs-editing-style 'hybrid)
hybrid-style-enable-evilified-state)))
(defun spacemacs//support-hjkl-navigation-p ()
"Returns non-nil if navigation keys should be evilified."
(or (eq dotspacemacs-editing-style 'vim)
(and (eq dotspacemacs-editing-style 'hybrid)
hybrid-style-enable-hjkl-bindings)))
(spacemacs|defc dotspacemacs-startup-banner 'official
"Specify the startup banner. Default value is `official', it displays
the official spacemacs logo. An integer value is the index of text

View file

@ -319,7 +319,7 @@
"sl" 'selectrum-repeat)
:config
(when (spacemacs//support-evilified-buffer-p)
(when (spacemacs//support-hjkl-navigation-p)
(define-key selectrum-minibuffer-map (kbd "C-j") 'selectrum-next-candidate)
(define-key selectrum-minibuffer-map (kbd "C-r") 'consult-history)
(define-key selectrum-minibuffer-map (kbd "C-k") 'selectrum-previous-candidate)
@ -362,7 +362,7 @@
(vertico-mode)
:config
(when (spacemacs//support-evilified-buffer-p)
(when (spacemacs//support-hjkl-navigation-p)
(define-key vertico-map (kbd "M-RET") #'vertico-exit-input)
(define-key vertico-map (kbd "C-SPC") #'spacemacs/embark-preview)
(define-key vertico-map (kbd "C-j") #'vertico-next)
@ -394,7 +394,7 @@
(defun compleseus/init-vertico-directory ()
(use-package vertico-directory
;; More convenient directory navigation commands
:init (bind-key "C-h" 'vertico-directory-delete-char vertico-map (spacemacs//support-evilified-buffer-p))
:init (bind-key "C-h" 'vertico-directory-delete-char vertico-map (spacemacs//support-hjkl-navigation-p))
;; Tidy shadowed file names
:hook (rfn-eshadow-update-overlay . vertico-directory-tidy)))