Skip to content

Commit

Permalink
binding(corfu): bind completionist to user-prefixed M-k
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed May 21, 2024
1 parent 149236e commit d4fe7ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lib/wal-complete.org
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ makes sense.

:wal-bind
(("k" . completion-at-point)
("M-k" . corfu-insert-separator)
;; M-k binds `completionist'.
:map corfu-map
("k" . corfu-quit)))

("k" . corfu-quit)
("M-k" . corfu-insert-separator)))
#+END_SRC

** corfu-quick :gnu:
Expand Down
6 changes: 3 additions & 3 deletions lib/wal-key-bindings.org
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ and command maps:
+ =C-c g= for =smerge=
+ =C-c i= for =compile=
+ =C-c j= is bound to =outline-minor-mode-map= (if mode is enabled)
+ =C-c k= for completion commands (=cape= and =tempel=)
+ =C-c l= to toggle =display-line-numbers-mode=
+ =C-c m= for =bookmark=
+ =C-c n= to take notes for an =org-agenda= item
Expand Down Expand Up @@ -64,7 +63,8 @@ Most hyper[fn:2] bindings are quick-access actions:
+ when used with =M= it goes to char with a timer
+ =H-;= jumps to register, =H-M-;= stores point in register
+ =H-k= completes at point; when =corfu= is active, it quits the
candidate selection (=H-M-k= will insert a separator)
candidate selection (=H-M-k= will insert a separator while =corfu=
is active, otherwise activate =completionist= keymap)
+ =H-'= acts on the current point with =embark= (immediately with
=H-M-'=)
+ =H-l= jumps to line with =avy= (beginning of line if called with
Expand Down Expand Up @@ -492,7 +492,7 @@ USER-KEY and LEADER can be used to prefix the key."
"h" '(:ignore t :wk "help")
"hw" 'woman)

(general-create-definer completionist :prefix "C-c k")
(general-create-definer completionist :prefix (wal-prefix-user-key "M-k"))
(eval-after-load 'which-key
(which-key-add-key-based-replacements "C-c k" "completionist"))

Expand Down

0 comments on commit d4fe7ac

Please sign in to comment.