Update hydras
This commit is contained in:
parent
48991c2d8f
commit
d1fb4a661c
6 changed files with 71 additions and 77 deletions
|
|
@ -24,16 +24,15 @@
|
|||
;; Hydra
|
||||
(defhydra my-clojure/context-hydra (:color teal :hint nil)
|
||||
"
|
||||
Clojure actions
|
||||
|
||||
^Cider^ ^Actions^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_j_: Jack in _t_: Run loaded test(s)
|
||||
_f_: Format buffer
|
||||
_l_: Load buffer
|
||||
^ Clojure actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Buffer: _r_: Reload _f_: Format _l_: Load
|
||||
Cider: _j_: Jack in _t_: Test
|
||||
^^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("r" revert-buffer-no-confirm)
|
||||
("j" cider-jack-in)
|
||||
("f" cider-format-buffer)
|
||||
("l" cider-load-buffer)
|
||||
|
|
|
|||
|
|
@ -12,16 +12,15 @@
|
|||
|
||||
(defhydra my-elixir/context-hydra (:color teal :hint nil)
|
||||
"
|
||||
^Elixir actions^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_r_: Reload buffer _f_: Format buffer
|
||||
_i_: Indent buffer _m_: iMenu
|
||||
^ Elixir actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Buffer: _r_: Reload _f_: Format _i_: Indent
|
||||
Other: _m_: iMenu
|
||||
^^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("r" revert-buffer-no-confirm)
|
||||
("i" indent-region)
|
||||
|
||||
("i" mark-and-indent-whole-buffer)
|
||||
("f" elixir-format)
|
||||
("m" lsp-ui-imenu))
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(require 'icejam-pkg-hydra "$HOME/.emacs.d/pkg/hydra.el")
|
||||
|
||||
(use-package tuareg
|
||||
:defer t
|
||||
:straight t
|
||||
|
|
@ -24,15 +26,16 @@
|
|||
|
||||
(defhydra my-ocaml/context-hydra (:color teal :hint nil)
|
||||
"
|
||||
OCaml actions
|
||||
|
||||
^OCaml^ ^Actions^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_f_: Format buffer
|
||||
_o_: Update opam env
|
||||
^ OCaml actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Buffer: _r_: Reload _f_: Format _i_: Indent
|
||||
Other: _o_: Opam env
|
||||
^^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("r" revert-buffer-no-confirm)
|
||||
("i" mark-and-indent-whole-buffer)
|
||||
("f" ocamlformat)
|
||||
("o" tuareg-opam-update-env))
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
;;; Commentary:
|
||||
;;; Old and rudimental completion framework.
|
||||
;;; Code:
|
||||
(require 'projectile)
|
||||
|
||||
;; Do not mix ctags between folders
|
||||
(provide 'my-ctags-config)
|
||||
(require 'icejam-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||
|
||||
(setq tags-add-tables nil)
|
||||
|
||||
|
|
@ -27,7 +24,7 @@
|
|||
)))
|
||||
|
||||
(cl-defun ctags/refresh-ctags (&key silent)
|
||||
"Refresh ctags according to currently set command."
|
||||
"Refresh ctags according to currently set command. With SILENT you can make it, uhh... silent."
|
||||
(interactive)
|
||||
|
||||
;; Print message if not silent
|
||||
|
|
@ -54,5 +51,6 @@
|
|||
(add-to-list (make-local-variable 'ctags/major-modes-to-update-on-save) mode))
|
||||
|
||||
(add-hook 'after-save-hook 'ctags/update-tags-on-save)
|
||||
|
||||
(provide 'icejam-pkg-ctags)
|
||||
;;; ctags.el ends here
|
||||
|
|
|
|||
90
pkg/hydra.el
90
pkg/hydra.el
|
|
@ -5,23 +5,30 @@
|
|||
|
||||
(require 'icejam-pkg-avy "$HOME/.emacs.d/pkg/avy.el")
|
||||
|
||||
(defun mark-and-indent-whole-buffer ()
|
||||
"Mark and indent whole buffer."
|
||||
(interactive)
|
||||
(indent-region (point-min) (point-max)))
|
||||
|
||||
(use-package hydra
|
||||
:straight t
|
||||
:defer t
|
||||
:config
|
||||
(defhydra hydra-file-switcher-menu (:color teal :hint nil)
|
||||
"
|
||||
General Actions
|
||||
|
||||
^Ivy^ ^Perspectives^ ^Projectile^ ^Magit^
|
||||
^^^^^^^^-------------------------------------------------------------------------------------
|
||||
_a_: Grep in buffer _p_: Switch perspective _s_: Switch project _m_: Git status
|
||||
_B_: Buffer list _b_: buffers in perspective _f_: Find file in project _C_: Git checkout
|
||||
_t_: Find file _K_: Kill perspective _g_: Grep in current project _M_: Git blame
|
||||
_d_: Deft _c_: Invalidate cache
|
||||
_w_: Avy goto word _n_: New project
|
||||
_l_: Avy goto line _i_: IELM console
|
||||
_:_: Avy goto char
|
||||
^ General actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
^Ivy: _a_: Grep in buffer _B_: Buffer list _t_: Find file
|
||||
^Avy: _w_: Goto word _l_: Goto line _:_: Goto char
|
||||
^
|
||||
^Perspective: _p_: Switch perspective _b_: Buffers in perspective _K_: Kill perspective
|
||||
^Projectile: _s_: Switch project _f_: Find file in project _g_: Grep in project
|
||||
^ _c_: Invalidate cache _n_: New project
|
||||
^Magit: _m_: Git status _C_: Git checkout _M_: Git blame
|
||||
^
|
||||
^LISP: _i_: Console _e_: Eval region
|
||||
^ _d_: Deft
|
||||
^
|
||||
"
|
||||
|
||||
("q" nil "cancel" :color blue)
|
||||
|
|
@ -44,6 +51,7 @@ _:_: Avy goto char
|
|||
("c" projectile-invalidate-cache)
|
||||
("n" projectile-add-known-project)
|
||||
("i" ielm)
|
||||
("e" eval-region)
|
||||
|
||||
("m" magit-status)
|
||||
("C" magit-checkout)
|
||||
|
|
@ -51,16 +59,12 @@ _:_: Avy goto char
|
|||
|
||||
(defhydra hydra-programming-menu (:color teal :hint nil)
|
||||
"
|
||||
Programming actions
|
||||
|
||||
^Code Manipulation^ ^Code Completion^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_c_: Comment line _y_: Yasnippet
|
||||
_r_: Regex replace _m_: Company
|
||||
_i_: Indent region _u_: Undo tree
|
||||
_a_: Align to regex
|
||||
_e_: Eval region
|
||||
_s_: Swiper
|
||||
^ Code actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Manipulate: _c_: Toggle comment _r_: Replace _i_: Indent _a_: Align
|
||||
Complete: _y_: Snippet _m_: Any (Company)
|
||||
Find: _s_: Swiper _u_: Undo tree
|
||||
^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
|
|
@ -68,7 +72,6 @@ _s_: Swiper
|
|||
("r" vr/replace)
|
||||
("i" indent-region)
|
||||
("a" align-regexp)
|
||||
("e" eval-region)
|
||||
("s" swiper)
|
||||
|
||||
("u" undo-tree-visualize)
|
||||
|
|
@ -77,51 +80,52 @@ _s_: Swiper
|
|||
|
||||
(defhydra hydra-window-menu (:color teal :hint nil)
|
||||
"
|
||||
Window actions
|
||||
|
||||
^Windows^ ^Move around^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_k_: Kill buffer and window _<left>_: Move left
|
||||
_h_: Split horizontally _<right>_: Move right
|
||||
_v_: Split vertically _<up>_: Move up
|
||||
_f_: Set font size to screen _<down>_: Move down
|
||||
^^ _p_: Previous buffer
|
||||
^^ _n_: Next buffer
|
||||
^ Buffer actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Move: _<left>_: Left _<right>_: Right _<up>_: Up _<down>_: Down
|
||||
Split: _h_: Horizontally _v_: Vertically
|
||||
_k_: Kill Buffer
|
||||
^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("k" kill-buffer-and-window)
|
||||
("h" split-window-below)
|
||||
("v" split-window-right)
|
||||
("f" set-font-to-screen)
|
||||
|
||||
("<left>" windmove-left)
|
||||
("<right>" windmove-right)
|
||||
("<up>" windmove-up)
|
||||
("<down>" windmove-down)
|
||||
("p" previous-buffer)
|
||||
("n" next-buffer))
|
||||
("<down>" windmove-down))
|
||||
|
||||
(defhydra hydra-language-context-menu (:color teal :hint nil)
|
||||
"
|
||||
Context actions
|
||||
|
||||
^Context^ ^Actions^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_r_: Reload buffer _f_: Format buffer
|
||||
_i_: Indent buffer _m_: iMenu
|
||||
^ Language-specific actions
|
||||
^^^^^^^^--------------------------------------------------------------------------------------------
|
||||
Buffer: _r_: Reload _f_: Format _i_: Indent
|
||||
Other: _m_: iMenu
|
||||
^^
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("r" revert-buffer-no-confirm)
|
||||
("i" indent-region)
|
||||
("i" mark-and-indent-whole-buffer)
|
||||
|
||||
("f" lsp-format-buffer)
|
||||
("m" lsp-ui-imenu))
|
||||
|
||||
(defhydra hydra-move-menu (:color teal)
|
||||
"Buffer history"
|
||||
("<left>" previous-buffer "Previous buffer")
|
||||
("<right>" next-buffer "Next buffer")
|
||||
("[" previous-buffer "Previous buffer")
|
||||
("]" next-buffer "Next buffer")
|
||||
("q" cancel "quit"))
|
||||
|
||||
:bind ("C-c p" . hydra-file-switcher-menu/body)
|
||||
("C-c c" . hydra-programming-menu/body)
|
||||
("C-c w" . hydra-window-menu/body)
|
||||
("C-c s" . hydra-move-menu/body)
|
||||
("C-c l" . hydra-language-context-menu/body))
|
||||
|
||||
(provide 'icejam-pkg-hydra)
|
||||
|
|
|
|||
|
|
@ -34,15 +34,6 @@
|
|||
(define-key icejam-keys-mode-map (kbd "C-c {") 'windmove-up)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c }") 'windmove-down)
|
||||
|
||||
;; Switch to previous and next buffer
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s <left>") 'previous-buffer)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s <right>") 'next-buffer)
|
||||
|
||||
;; The same, but without arrow keys.
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s [") 'previous-buffer)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s ]") 'next-buffer)
|
||||
|
||||
|
||||
;; Kill current buffer and window
|
||||
(define-key icejam-keys-mode-map (kbd "C-c q") 'kill-buffer-and-window)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue