summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Hoch <95583314+julian-hoch@users.noreply.github.com>2024-08-12 03:43:39 +0200
committerGitHub <noreply@github.com>2024-08-12 09:43:39 +0800
commitadc69d21c2fd40900a6330c89c5be1c6cb458737 (patch)
tree4f1edd4f9348307dd9ec9e7034bf922d984e6a61
parente49d8e96ccc83d2bf7583c124582fc1ef076b15c (diff)
Hyrolo: Initial support (#822)
* Added hyrolo search result bindings * set correct hyrolo search navigation keys * hyrolo mode * setting initial state * declared functions for hyrolo
-rw-r--r--evil-collection.el1
-rw-r--r--modes/hyrolo/evil-collection-hyrolo.el32
2 files changed, 33 insertions, 0 deletions
diff --git a/evil-collection.el b/evil-collection.el
index 62ad4c6..8200caa 100644
--- a/evil-collection.el
+++ b/evil-collection.el
@@ -229,6 +229,7 @@ See `evil-collection-init' and `evil-collection--modes-with-delayed-setup'."
helpful
hg-histedit
hungry-delete
+ hyrolo
ibuffer
(image image-mode)
image-dired
diff --git a/modes/hyrolo/evil-collection-hyrolo.el b/modes/hyrolo/evil-collection-hyrolo.el
new file mode 100644
index 0000000..2dd0033
--- /dev/null
+++ b/modes/hyrolo/evil-collection-hyrolo.el
@@ -0,0 +1,32 @@
+;;; evil-collection-hyrolo.el --- Bindings for `hyrolo' -*- lexical-binding: t -*-
+
+;;; Commentary:
+;;; Bindings for hyrolo.
+
+;;; Code:
+(require 'evil-collection)
+(require 'hyperbole nil t)
+
+(defvar hyrolo-mode-map)
+(defconst evil-collection-hyrolo-maps '(hyrolo-mode-map))
+
+(declare-function hyrolo-to-previous-loc "hyrolo")
+(declare-function hyrolo-to-next-loc "hyrolo")
+(declare-function hyrolo-overview "hyrolo")
+(declare-function hyrolo-outline-show-all "hyrolo")
+
+(defun evil-collection-hyrolo-setup ()
+ "Set up `evil' bindings for hyrolo."
+ (evil-collection-define-key 'normal 'hyrolo-mode-map
+ (kbd "[[") #'hyrolo-to-previous-loc
+ (kbd "]]") #'hyrolo-to-next-loc
+ (kbd "C-k") #'hyrolo-to-previous-loc
+ (kbd "C-j") #'hyrolo-to-next-loc
+ (kbd "gk") #'hyrolo-to-previous-loc
+ (kbd "gj") #'hyrolo-to-next-loc
+ (kbd "zo") #'hyrolo-outline-show-all
+ (kbd "zc") #'hyrolo-overview)
+ (evil-set-initial-state 'hyrolo-mode 'normal))
+
+(provide 'evil-collection-hyrolo)
+;;; evil-collection-hyrolo.el ends here