Fix formatting

This commit is contained in:
Maciej 2023-03-16 20:07:28 +02:00
parent 1ad9d7b5b0
commit 734de0c3ac
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
3 changed files with 114 additions and 120 deletions

View file

@ -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."

View file

@ -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 ()

View file

@ -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>" " Left" windmove-left)
("<right>" "Right" windmove-right)
("<up>" " Up" windmove-up)
("<down>" " 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>" " Left" windmove-left)
("<right>" "Right" windmove-right)
("<up>" " Up" windmove-up)
("<down>" " 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)