fix leader prefix keymaps

This functionality was broken after removing general.
This commit is contained in:
Peter Tillemans 2024-08-02 13:44:21 +02:00
parent 64b698633c
commit af50a623e8

View file

@ -290,15 +290,19 @@ muscle memory.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; make vc commands available via leader key ;; make vc commands available via leader key
(evil-define-key 'normal 'global (evil-define-key 'normal 'global
(kbd "<leader>v") 'vc-prefix-map) (kbd "<leader>v") vc-prefix-map)
#+END_SRC #+END_SRC
#+RESULTS:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; make project commands available via leader key ;; make project commands available via leader key
(evil-define-key 'normal 'global (evil-define-key 'normal 'global
(kbd "<leader>p") 'project-prefix-map) (kbd "<leader>p") project-prefix-map)
#+END_SRC #+END_SRC
#+RESULTS:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(evil-define-key 'normal 'global (evil-define-key 'normal 'global
(kbd "<leader>ff") #'find-file (kbd "<leader>ff") #'find-file
@ -315,9 +319,8 @@ muscle memory.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package harpoon (use-package harpoon
:ensure t :ensure t
:commands (harpoon-add-file harpoon-go-to-1 harpoon-go-to-2 harpoon-toggle-quick-menu) :init
:config (setq pti-harpoon-map (make-sparse-keymap))
(let ((pti-harpoon-map (make-sparse-keymap)))
(keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu)
(keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file) (keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file)
(keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file) (keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file)
@ -326,9 +329,12 @@ muscle memory.
(keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3) (keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3)
(keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4)
(keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu)
(evil-define-key 'normal 'global :bind
(kbd "<leader>h") (pti-harpoon-map)))) (("<leader>h" . ' 'pti-harpoon-map)))
#+END_SRC #+END_SRC
#+RESULTS:
** User Interface ** User Interface
*** Do not show default splash screen *** Do not show default splash screen
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp