From f009e48d74f38b507b30d9f799bc6f964e0c27f5 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Fri, 9 Jul 2021 09:30:42 +0100 Subject: Update some more - bindings and git-gutter --- emacs-prelude/personal/lisp/init-completion.el | 8 ++++++-- emacs-prelude/personal/lisp/init-git.el | 11 ++++++++++- emacs-prelude/personal/lisp/init-prelude.el | 6 ++++++ 3 files changed, 22 insertions(+), 3 deletions(-) (limited to 'emacs-prelude/personal') diff --git a/emacs-prelude/personal/lisp/init-completion.el b/emacs-prelude/personal/lisp/init-completion.el index 08e2cba..91d8244 100644 --- a/emacs-prelude/personal/lisp/init-completion.el +++ b/emacs-prelude/personal/lisp/init-completion.el @@ -5,6 +5,7 @@ (setq tab-always-indent 'complete) ;; for vertico + ;; Do not allow the cursor in the minibuffer prompt (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) @@ -244,14 +245,17 @@ (embark-collect-mode . consult-preview-at-point-mode)) ;; async fuzzy finder (uses consult and orderless) +(prelude-require-package 'affe) (use-package affe :after orderless :config ;; Configure Orderless (setq affe-regexp-function #'orderless-pattern-compiler affe-highlight-function #'orderless--highlight) - ;; Manual preview key for `affe-grep' - (consult-customize affe-grep :preview-key (kbd "M-."))) + (consult-customize affe-grep :preview-key (kbd "M-.")) + :bind + (("C-c c a g" . affe-grep) + ("C-c c a f" . affe-find))) (provide 'init-completion) diff --git a/emacs-prelude/personal/lisp/init-git.el b/emacs-prelude/personal/lisp/init-git.el index 7bc19f1..626b3d0 100644 --- a/emacs-prelude/personal/lisp/init-git.el +++ b/emacs-prelude/personal/lisp/init-git.el @@ -21,5 +21,14 @@ (use-package forge :after magit) -(provide 'init-git) +(prelude-require-package 'git-gutter) +(use-package git-gutter + :diminish + :bind + ("C-c j g" . git-gutter-mode) + ("C-c j S-g" . git-gutter) + ("C-c j n" . git-gutter:next-hunk) + ("C-c j p" . git-gutter:previous-hunk) + ("C-c j r" . git-gutter:revert-hunk)) +(provide 'init-git) diff --git a/emacs-prelude/personal/lisp/init-prelude.el b/emacs-prelude/personal/lisp/init-prelude.el index c857e16..d52b2ec 100644 --- a/emacs-prelude/personal/lisp/init-prelude.el +++ b/emacs-prelude/personal/lisp/init-prelude.el @@ -28,6 +28,12 @@ :init (unbind-key "C-c s" prelude-mode-map) :bind (:map prelude-mode-map ("C-c S" . crux-swap-windows))) +(use-package key-chord + :init + (key-chord-unset-global "jl") + (key-chord-define-global "LL" 'avy-goto-line) + (key-chord-define-global ",," 'avy-goto-char-in-line)) + (diminish 'prelude-mode) (provide 'init-prelude) -- cgit 1.4.1-2-gfad0