diff --git a/lang/clojure.el b/lang/clojure.el index 16b2547..a5ed411 100644 --- a/lang/clojure.el +++ b/lang/clojure.el @@ -21,18 +21,18 @@ ;; Hydra (transient-define-prefix +my-transient-cider-context-menu () - "Clojure Buffer Commands" - ["" - ["Cider" - ("j" "Jack in" cider-jack-in) - ("t" "Test" cider-test-run-loaded-tests)] - ["Buffer" - ("r" "Reload" revert-buffer-no-confirm) - ("f" "Format" cider-format-buffer) - ("l" "Load" cider-load-buffer) - ("e" "Show Errors" flycheck-list-errors)]] - ["" - ("q" "Quit" keyboard-quit)]) + "Clojure Buffer Commands" + ["" + ["Cider" + ("j" "Jack in" cider-jack-in) + ("t" "Test" cider-test-run-loaded-tests)] + ["Buffer" + ("r" "Reload" revert-buffer-no-confirm) + ("f" "Format" cider-format-buffer) + ("l" "Load" cider-load-buffer) + ("e" "Show Errors" flycheck-list-errors)]] + ["" + ("q" "Quit" keyboard-quit)]) (defun activate-my-clojure-mode () "Goodies for clojure files." diff --git a/lang/ocaml.el b/lang/ocaml.el index 6a2f5f5..c7e47a7 100644 --- a/lang/ocaml.el +++ b/lang/ocaml.el @@ -27,13 +27,13 @@ "Ocaml Actions" ["OCaml actions" ["" - ("r" "Reload" revert-buffer-no-confirm) - ("i" "Indent" mark-and-indent-whole-buffer)] + ("r" "Reload" revert-buffer-no-confirm) + ("i" "Indent" mark-and-indent-whole-buffer)] ["" - ("f" "Format" ocamlformat) - ("e" "Opam Env" tuareg-opam-update-env)]] + ("f" "Format" ocamlformat) + ("e" "Opam Env" tuareg-opam-update-env)]] ["" - ("q" "Quit" keyboard-quit)]) + ("q" "Quit" keyboard-quit)]) (defun load-ocaml-site-packages () "Generate ocaml config." @@ -70,13 +70,13 @@ "ReasonML Actions" ["ReasonML actions" ["" - ("r" "Reload" revert-buffer-no-confirm) - ("i" "Indent" mark-and-indent-whole-buffer)] + ("r" "Reload" revert-buffer-no-confirm) + ("i" "Indent" mark-and-indent-whole-buffer)] ["" - ("f" "Format" refmt) - ("e" "Opam Env" tuareg-opam-update-env)]] + ("f" "Format" refmt) + ("e" "Opam Env" tuareg-opam-update-env)]] ["" - ("q" "Quit" keyboard-quit)]) + ("q" "Quit" keyboard-quit)]) (defun my-reason-mode () diff --git a/pkg/hydra.el b/pkg/hydra.el index e6d276b..e5dfce8 100644 --- a/pkg/hydra.el +++ b/pkg/hydra.el @@ -12,110 +12,104 @@ (interactive) (indent-region (point-min) (point-max))) - (transient-define-prefix +my-transient-project-menu () - "Project Commands" - ["" - ["Projectile" - ("s" "Switch project" counsel-projectile-switch-project) - ("f" "Find file in project" counsel-projectile-find-file) - ("g" "Grep in project" counsel-projectile-rg) - ("c" "invalidate cache" projectile-invalidate-cache) - ("n" "New project" projectile-add-known-project)] - ["Ivy" - ("a" "Grep in buffer" counsel-rg) - ("b" "Buffer list" ibuffer) - ("t" "Find file" counsel-find-file)] - ["Magit" - ("m" "Git status" magit-status) - ("C" "Git checkout" magit-checkout) - ("M" "Git blame" magit-blame)]] - ["" - ["LISP" - ("i" "IELM" ielm) - ("e" "eval-region" eval-region)] - ["Other" - ("d" "deft" deft) - ("T" "Speed Type" speed-type-text)]]) +(transient-define-prefix +my-transient-project-menu () + "Project Commands" + ["" + ["Projectile" + ("s" "Switch project" counsel-projectile-switch-project) + ("f" "Find file in project" counsel-projectile-find-file) + ("g" "Grep in project" counsel-projectile-rg) + ("c" "invalidate cache" projectile-invalidate-cache) + ("n" "New project" projectile-add-known-project)] + ["Ivy" + ("a" "Grep in buffer" counsel-rg) + ("b" "Buffer list" ibuffer) + ("t" "Find file" counsel-find-file)] + ["Magit" + ("m" "Git status" magit-status) + ("C" "Git checkout" magit-checkout) + ("M" "Git blame" magit-blame)]] + ["" + ["LISP" + ("i" "IELM" ielm) + ("e" "eval-region" eval-region)] + ["Other" + ("d" "deft" deft) + ("T" "Speed Type" speed-type-text)]]) - (transient-define-prefix +my-transient-code-menu () - "Code Commands" - ["" - ["Manipulate" - ("c" "Toggle Comment" comment-line) - ("r" "Replace" vr/replace) - ("i" "Indent" indent-region) - ("a" "Align" align-regexp)] - ["Complete" - ("y" "Snippet" company-yasnippet) - ("m" "Any (Company)" company-complete)] - ["Find" - ("s" "Swiper" swiper) - ("u" "Undo tree" undo-tree-visualize) - ("d" "Dash" dash-at-point)]]) +(transient-define-prefix +my-transient-code-menu () + "Code Commands" + ["" + ["Manipulate" + ("c" "Toggle Comment" comment-line) + ("r" "Replace" vr/replace) + ("i" "Indent" indent-region) + ("a" "Align" align-regexp)] + ["Complete" + ("y" "Snippet" company-yasnippet) + ("m" "Any (Company)" company-complete)] + ["Find" + ("s" "Swiper" swiper) + ("u" "Undo tree" undo-tree-visualize) + ("d" "Dash" dash-at-point)]]) - (transient-define-prefix +my-transient-window-menu () - "Windows Commands" - ["" - ["Move" - ("" " Left" windmove-left) - ("" "Right" windmove-right) - ("" " Up" windmove-up) - ("" " Down" windmove-down)] - ["Split" - ("h" "Horizontally" split-window-below) - ("v" "Vertically" split-window-right)] - ["Kill" - "" - "" - "" - ("k" "Kill Buffer" kill-buffer-and-window)]]) +(transient-define-prefix +my-transient-window-menu () + "Windows Commands" + ["" + ["Move" + ("" " Left" windmove-left) + ("" "Right" windmove-right) + ("" " Up" windmove-up) + ("" " Down" windmove-down)] + ["Split" + ("h" "Horizontally" split-window-below) + ("v" "Vertically" split-window-right)] + ["Kill" + "" + "" + "" + ("k" "Kill Buffer" kill-buffer-and-window)]]) - (transient-define-prefix +my-transient-language-context-menu () - "Language (Buffer) Commands" - ["" - ["Buffer" - ("r" "Reload" revert-buffer-no-confirm) - ("f" "Format" lsp-format-buffer) - ("i" "Indent" mark-and-indent-whole-buffer)] - ["Other" - ("m" "iMenu" lsp-ui-imenu) - ("e" "Show Errors" flycheck-list-errors)]]) +(transient-define-prefix +my-transient-language-context-menu () + "Language (Buffer) Commands" + ["" + ["Buffer" + ("r" "Reload" revert-buffer-no-confirm) + ("f" "Format" lsp-format-buffer) + ("i" "Indent" mark-and-indent-whole-buffer)] + ["Other" + ("m" "iMenu" lsp-ui-imenu) + ("e" "Show Errors" flycheck-list-errors)]]) - (transient-define-prefix +my-transient-history-menu () - "Buffer History Commands" - ["History" - ("[" "Previous" previous-buffer) - ("]" "Next" previous-buffer)]) +(transient-define-prefix +my-transient-history-menu () + "Buffer History Commands" + ["History" + ("[" "Previous" previous-buffer) + ("]" "Next" previous-buffer)]) - (transient-define-prefix +my-transient-move-menu () - "Language (Buffer) Commands" - ["" - ["Move this buffer" - ("{" "Up" buf-move-left) - ("[" "Left" buf-move-right) - ("}" "Right" buf-move-up) - ("]" "Down" buf-move-down)] - ["Jump to" - ("w" "Word" avy-goto-word-1) - ("l" "Character" avy-goto-line) - ("c" "Line" avy-goto-char-2)]]) +(transient-define-prefix +my-transient-move-menu () + "Language (Buffer) Commands" + ["" + ["Move this buffer" + ("{" "Up" buf-move-left) + ("[" "Left" buf-move-right) + ("}" "Right" buf-move-up) + ("]" "Down" buf-move-down)] + ["Jump to" + ("w" "Word" avy-goto-word-1) + ("l" "Character" avy-goto-line) + ("c" "Line" avy-goto-char-2)]]) - (transient-define-prefix +my-transient-font-menu () - "Font Commands" - ["" - ["Everywhere" - ("R" "Set size" set-font-to-screen) - ("s" "Reset to default" set-font-size)] - ["In this buffer" - ("i" "Bigger" (lambda () - (interactive) - (text-scale-increase 1))) - ("d" "Smaller" (lambda () - (interactive) - (text-scale-decrease 1))) - ("r" "Reset" (lambda () - (interactive) - (text-scale-adjust 0)))]]) +(transient-define-prefix +my-transient-font-menu () + "Font Commands" + ["" + ["Everywhere" + ("R" "Set size" set-font-to-screen) + ("s" "Reset to default" set-font-size)] + ["In this buffer" + ("i" "Bigger" (lambda () (interactive) (text-scale-increase 1))) + ("d" "Smaller" (lambda () (interactive) (text-scale-decrease 1))) + ("r" "Reset" (lambda () (interactive) (text-scale-adjust 0)))]]) (define-key +custom-keys-mode-map (kbd "C-c p") '+my-transient-project-menu) (define-key +custom-keys-mode-map (kbd "C-c c") '+my-transient-code-menu)