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 ;; Hydra
(transient-define-prefix +my-transient-cider-context-menu () (transient-define-prefix +my-transient-cider-context-menu ()
"Clojure Buffer Commands" "Clojure Buffer Commands"
["" [""
["Cider" ["Cider"
("j" "Jack in" cider-jack-in) ("j" "Jack in" cider-jack-in)
("t" "Test" cider-test-run-loaded-tests)] ("t" "Test" cider-test-run-loaded-tests)]
["Buffer" ["Buffer"
("r" "Reload" revert-buffer-no-confirm) ("r" "Reload" revert-buffer-no-confirm)
("f" "Format" cider-format-buffer) ("f" "Format" cider-format-buffer)
("l" "Load" cider-load-buffer) ("l" "Load" cider-load-buffer)
("e" "Show Errors" flycheck-list-errors)]] ("e" "Show Errors" flycheck-list-errors)]]
["" [""
("q" "Quit" keyboard-quit)]) ("q" "Quit" keyboard-quit)])
(defun activate-my-clojure-mode () (defun activate-my-clojure-mode ()
"Goodies for clojure files." "Goodies for clojure files."

View file

@ -27,13 +27,13 @@
"Ocaml Actions" "Ocaml Actions"
["OCaml actions" ["OCaml actions"
["" [""
("r" "Reload" revert-buffer-no-confirm) ("r" "Reload" revert-buffer-no-confirm)
("i" "Indent" mark-and-indent-whole-buffer)] ("i" "Indent" mark-and-indent-whole-buffer)]
["" [""
("f" "Format" ocamlformat) ("f" "Format" ocamlformat)
("e" "Opam Env" tuareg-opam-update-env)]] ("e" "Opam Env" tuareg-opam-update-env)]]
["" [""
("q" "Quit" keyboard-quit)]) ("q" "Quit" keyboard-quit)])
(defun load-ocaml-site-packages () (defun load-ocaml-site-packages ()
"Generate ocaml config." "Generate ocaml config."
@ -70,13 +70,13 @@
"ReasonML Actions" "ReasonML Actions"
["ReasonML actions" ["ReasonML actions"
["" [""
("r" "Reload" revert-buffer-no-confirm) ("r" "Reload" revert-buffer-no-confirm)
("i" "Indent" mark-and-indent-whole-buffer)] ("i" "Indent" mark-and-indent-whole-buffer)]
["" [""
("f" "Format" refmt) ("f" "Format" refmt)
("e" "Opam Env" tuareg-opam-update-env)]] ("e" "Opam Env" tuareg-opam-update-env)]]
["" [""
("q" "Quit" keyboard-quit)]) ("q" "Quit" keyboard-quit)])
(defun my-reason-mode () (defun my-reason-mode ()

View file

@ -12,110 +12,104 @@
(interactive) (interactive)
(indent-region (point-min) (point-max))) (indent-region (point-min) (point-max)))
(transient-define-prefix +my-transient-project-menu () (transient-define-prefix +my-transient-project-menu ()
"Project Commands" "Project Commands"
["" [""
["Projectile" ["Projectile"
("s" "Switch project" counsel-projectile-switch-project) ("s" "Switch project" counsel-projectile-switch-project)
("f" "Find file in project" counsel-projectile-find-file) ("f" "Find file in project" counsel-projectile-find-file)
("g" "Grep in project" counsel-projectile-rg) ("g" "Grep in project" counsel-projectile-rg)
("c" "invalidate cache" projectile-invalidate-cache) ("c" "invalidate cache" projectile-invalidate-cache)
("n" "New project" projectile-add-known-project)] ("n" "New project" projectile-add-known-project)]
["Ivy" ["Ivy"
("a" "Grep in buffer" counsel-rg) ("a" "Grep in buffer" counsel-rg)
("b" "Buffer list" ibuffer) ("b" "Buffer list" ibuffer)
("t" "Find file" counsel-find-file)] ("t" "Find file" counsel-find-file)]
["Magit" ["Magit"
("m" "Git status" magit-status) ("m" "Git status" magit-status)
("C" "Git checkout" magit-checkout) ("C" "Git checkout" magit-checkout)
("M" "Git blame" magit-blame)]] ("M" "Git blame" magit-blame)]]
["" [""
["LISP" ["LISP"
("i" "IELM" ielm) ("i" "IELM" ielm)
("e" "eval-region" eval-region)] ("e" "eval-region" eval-region)]
["Other" ["Other"
("d" "deft" deft) ("d" "deft" deft)
("T" "Speed Type" speed-type-text)]]) ("T" "Speed Type" speed-type-text)]])
(transient-define-prefix +my-transient-code-menu () (transient-define-prefix +my-transient-code-menu ()
"Code Commands" "Code Commands"
["" [""
["Manipulate" ["Manipulate"
("c" "Toggle Comment" comment-line) ("c" "Toggle Comment" comment-line)
("r" "Replace" vr/replace) ("r" "Replace" vr/replace)
("i" "Indent" indent-region) ("i" "Indent" indent-region)
("a" "Align" align-regexp)] ("a" "Align" align-regexp)]
["Complete" ["Complete"
("y" "Snippet" company-yasnippet) ("y" "Snippet" company-yasnippet)
("m" "Any (Company)" company-complete)] ("m" "Any (Company)" company-complete)]
["Find" ["Find"
("s" "Swiper" swiper) ("s" "Swiper" swiper)
("u" "Undo tree" undo-tree-visualize) ("u" "Undo tree" undo-tree-visualize)
("d" "Dash" dash-at-point)]]) ("d" "Dash" dash-at-point)]])
(transient-define-prefix +my-transient-window-menu () (transient-define-prefix +my-transient-window-menu ()
"Windows Commands" "Windows Commands"
["" [""
["Move" ["Move"
("<left>" " Left" windmove-left) ("<left>" " Left" windmove-left)
("<right>" "Right" windmove-right) ("<right>" "Right" windmove-right)
("<up>" " Up" windmove-up) ("<up>" " Up" windmove-up)
("<down>" " Down" windmove-down)] ("<down>" " Down" windmove-down)]
["Split" ["Split"
("h" "Horizontally" split-window-below) ("h" "Horizontally" split-window-below)
("v" "Vertically" split-window-right)] ("v" "Vertically" split-window-right)]
["Kill" ["Kill"
"" ""
"" ""
"" ""
("k" "Kill Buffer" kill-buffer-and-window)]]) ("k" "Kill Buffer" kill-buffer-and-window)]])
(transient-define-prefix +my-transient-language-context-menu () (transient-define-prefix +my-transient-language-context-menu ()
"Language (Buffer) Commands" "Language (Buffer) Commands"
["" [""
["Buffer" ["Buffer"
("r" "Reload" revert-buffer-no-confirm) ("r" "Reload" revert-buffer-no-confirm)
("f" "Format" lsp-format-buffer) ("f" "Format" lsp-format-buffer)
("i" "Indent" mark-and-indent-whole-buffer)] ("i" "Indent" mark-and-indent-whole-buffer)]
["Other" ["Other"
("m" "iMenu" lsp-ui-imenu) ("m" "iMenu" lsp-ui-imenu)
("e" "Show Errors" flycheck-list-errors)]]) ("e" "Show Errors" flycheck-list-errors)]])
(transient-define-prefix +my-transient-history-menu () (transient-define-prefix +my-transient-history-menu ()
"Buffer History Commands" "Buffer History Commands"
["History" ["History"
("[" "Previous" previous-buffer) ("[" "Previous" previous-buffer)
("]" "Next" previous-buffer)]) ("]" "Next" previous-buffer)])
(transient-define-prefix +my-transient-move-menu () (transient-define-prefix +my-transient-move-menu ()
"Language (Buffer) Commands" "Language (Buffer) Commands"
["" [""
["Move this buffer" ["Move this buffer"
("{" "Up" buf-move-left) ("{" "Up" buf-move-left)
("[" "Left" buf-move-right) ("[" "Left" buf-move-right)
("}" "Right" buf-move-up) ("}" "Right" buf-move-up)
("]" "Down" buf-move-down)] ("]" "Down" buf-move-down)]
["Jump to" ["Jump to"
("w" "Word" avy-goto-word-1) ("w" "Word" avy-goto-word-1)
("l" "Character" avy-goto-line) ("l" "Character" avy-goto-line)
("c" "Line" avy-goto-char-2)]]) ("c" "Line" avy-goto-char-2)]])
(transient-define-prefix +my-transient-font-menu () (transient-define-prefix +my-transient-font-menu ()
"Font Commands" "Font Commands"
["" [""
["Everywhere" ["Everywhere"
("R" "Set size" set-font-to-screen) ("R" "Set size" set-font-to-screen)
("s" "Reset to default" set-font-size)] ("s" "Reset to default" set-font-size)]
["In this buffer" ["In this buffer"
("i" "Bigger" (lambda () ("i" "Bigger" (lambda () (interactive) (text-scale-increase 1)))
(interactive) ("d" "Smaller" (lambda () (interactive) (text-scale-decrease 1)))
(text-scale-increase 1))) ("r" "Reset" (lambda () (interactive) (text-scale-adjust 0)))]])
("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 p") '+my-transient-project-menu)
(define-key +custom-keys-mode-map (kbd "C-c c") '+my-transient-code-menu) (define-key +custom-keys-mode-map (kbd "C-c c") '+my-transient-code-menu)