fix(corfu): move binds to :config default
Bindings were moved to the `:config default` module and some keys were adjusted to match Company/other modules. Small formatting issues and some apparently inintended nestings were corrected as well.
This commit is contained in:
parent
b245bb3492
commit
f5b3531f28
4 changed files with 85 additions and 63 deletions
|
@ -48,8 +48,8 @@
|
|||
(time-to-seconds))
|
||||
collect (epg-sub-key-fingerprint subkey))))
|
||||
user-mail-address))
|
||||
;; And suppress prompts if epa-file-encrypt-to has a default value (without
|
||||
;; overwriting file-local values).
|
||||
;; And suppress prompts if epa-file-encrypt-to has a default value (without
|
||||
;; overwriting file-local values).
|
||||
(defadvice! +default--dont-prompt-for-keys-a (&rest _)
|
||||
:before #'epa-file-write-region
|
||||
(unless (local-variable-p 'epa-file-encrypt-to)
|
||||
|
@ -165,7 +165,7 @@
|
|||
(and (sp-in-code-p id action context)
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position))
|
||||
(looking-at-p "[ ]*#include[^<]+"))))
|
||||
(looking-at-p "[ \t]*#include[^<]+"))))
|
||||
|
||||
;; ...and leave it to smartparens
|
||||
(sp-local-pair '(c++-mode objc-mode)
|
||||
|
@ -453,6 +453,39 @@ Continues comments if executed from a commented line. Consults
|
|||
'(evil-ex-completion-map)))
|
||||
"C-s" command))
|
||||
|
||||
(map! :when (modulep! :completion corfu)
|
||||
:after corfu
|
||||
(:map corfu-map
|
||||
[return] #'corfu-insert
|
||||
"RET" #'corfu-insert
|
||||
"C-s" #'+corfu-move-to-minibuffer
|
||||
"C-p" #'corfu-previous
|
||||
"C-n" #'corfu-next
|
||||
(:when (modulep! :completion corfu +orderless)
|
||||
"<remap> <completion-at-point>" #'+corfu-smart-sep-toggle-escape)
|
||||
(:when (modulep! :completion corfu +tng)
|
||||
[tab] #'corfu-next
|
||||
"TAB" #'corfu-next
|
||||
[backtab] #'corfu-previous
|
||||
"S-TAB" #'corfu-previous))
|
||||
(:after corfu-popupinfo
|
||||
:map corfu-popupinfo-map
|
||||
"C-<up>" #'corfu-popupinfo-scroll-down
|
||||
"C-<down>" #'corfu-popupinfo-scroll-up
|
||||
"C-S-p" #'corfu-popupinfo-scroll-down
|
||||
"C-S-n" #'corfu-popupinfo-scroll-up
|
||||
"C-S-u" (cmd! (funcall-interactively #'corfu-popupinfo-scroll-down corfu-popupinfo-min-height))
|
||||
"C-S-d" (cmd! (funcall-interactively #'corfu-popupinfo-scroll-up corfu-popupinfo-min-height))))
|
||||
|
||||
(when-let ((cmds-del (and (modulep! :completion corfu +tng)
|
||||
(cmds! (and (> corfu--index -1)
|
||||
(eq corfu-preview-current 'insert))
|
||||
#'corfu-reset))))
|
||||
(map! :after corfu
|
||||
:map corfu-map
|
||||
[backspace] cmds-del
|
||||
"DEL" cmds-del))
|
||||
|
||||
;; Smarter C-a/C-e for both Emacs and Evil. C-a will jump to indentation.
|
||||
;; Pressing it again will send you to the true bol. Same goes for C-e, except
|
||||
;; it will ignore comments+trailing whitespace before jumping to eol.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue