Configure transients
Some checks failed
/ Test config on 20 (push) Failing after 50s

This commit is contained in:
Maciej 2025-01-16 19:22:00 +02:00
parent 040ffa7cb3
commit 3641dad52a
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
5 changed files with 681 additions and 681 deletions

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,10 @@
corfu-left-margin-width 0.5 corfu-left-margin-width 0.5
corfu-bar-width 0.5 corfu-bar-width 0.5
corfu-auto-delay 0.1 corfu-auto-delay 0.1
;; Do not insert when you type a word that happens to be a
;; completion candidate. A typical example is `format`, which
;; is a yas snippet.
corfu-on-exact-match 'nil
corfu-popupinfo-delay '(0.4 . 0.2) corfu-popupinfo-delay '(0.4 . 0.2)
corfu-auto t corfu-auto t
corfu-quit-no-match 'separator corfu-quit-no-match 'separator

View file

@ -15,100 +15,106 @@
(transient-define-prefix icejam-project-menu () (transient-define-prefix icejam-project-menu ()
"Project Commands." "Project Commands."
["" [["Project"
["Project"
("s" "Switch project" project-switch-project) ("s" "Switch project" project-switch-project)
("f" "Find file in project" project-find-file) ("f" "Find file in project" project-find-file)
("g" "Grep in project" consult-ripgrep)] ("g" "Grep in project" consult-ripgrep)
["Completions"
("a" "Grep in buffer" consult-line)
("b" "Find Buffer" consult-buffer)
("t" "Find file" find-file)] ("t" "Find file" 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)]
["" ["Completions"
["LISP" ("a" "Grep in buffer" consult-line)
("b" "Find Buffer" consult-buffer)]]
[["LISP"
("i" "IELM" ielm) ("i" "IELM" ielm)
("B" "iBuffer" ibuffer) ("B" "iBuffer" ibuffer)
("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)]]
[[""
("q" "Quit" keyboard-quit)]])
(transient-define-prefix icejam-code-menu () (transient-define-prefix icejam-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)]]
["Complete" [["Complete"
("g" "Ask GPT" gptel-menu) ("g" "Ask GPTel" gptel-menu)
("a" "Aider" aider-transient-menu) ("a" "Aider" aider-transient-menu)
("e" "Refactor (Elysium)" elysium-query)] ("e" "Refactor with Elysium" elysium-query)]]
["Find" [["Find"
("s" "Swiper" consult-line) ("s" "Swiper" consult-line)
("u" "Vundo" vundo) ("u" "Vundo" vundo)
("d" "Dash" dash-at-point)]]) ("d" "Dash" dash-at-point)]])
(transient-define-prefix icejam-window-menu () (transient-define-prefix icejam-buffer-menu ()
"Windows Commands." "Buffers and windows."
["" [""
["Move" ["Move Cursor"
("<left>" " Left" windmove-left) :pad-keys t
("<right>" "Right" windmove-right) ("<left>" "Left buffer" windmove-left)
("<up>" " Up" windmove-up) ("<right>" "Right buffer" windmove-right)
("<down>" " Down" windmove-down)] ("<up>" "Top buffer" windmove-up)
("<down>" "Bottom buffer" windmove-down)]
["Move this buffer"
:pad-keys t
("v[" "To left" buf-move-left)
("v]" "To right" buf-move-right)
("h[" "Up" buf-move-up)
("h]" "Down" buf-move-down)]]
[["Jump to"
("w" "Word" avy-goto-word-1)
("l" "Line" avy-goto-line)
("c" "Character" avy-goto-char-2)]
["Split" ["Split"
("h" "Horizontally" split-window-below) ("\\" "To right" split-window-right)
("v" "Vertically" split-window-right)] ("/" "To bottom" split-window-below)]]
["Kill" [["Buffers"
"" :pad-keys t
"" ("s[" "Go to previous buffer" previous-buffer)
"" ("s]" "Go to next buffer" next-buffer)
("k" "Kill Buffer" kill-buffer-and-window)]]) ("bi" "iBuffer" ibuffer)
("bf" "Find buffer" consult-buffer)
("k" "Kill buffer and window" kill-buffer-and-window)]]
[["Fonts"
:pad-keys t
("fs" "Adjust font size globally" global-text-scale-adjust)
("fi" "Increase by one in this buffer"
(lambda () (interactive) (text-scale-increase 1)))
("fd" "Decrease by one in this buffer"
(lambda () (interactive) (text-scale-decrease 1)))
("fr" "Reset this buffer"
(lambda () (interactive) (text-scale-adjust 0)))]]
[[""
("q" "Quit" keyboard-quit)]])
(transient-define-prefix icejam-language-menu () (transient-define-prefix icejam-language-menu ()
"Language (Buffer) Commands." "Language (Buffer) Commands."
["" [[:description
["Buffer" (lambda ()
("r" "Reload" icejam-revert-buffer-no-confirm) (concat (propertize "Code actions for " 'face 'transient-heading)
("f" "Format" lsp-format-buffer) (propertize (format "%s" major-mode) 'face 'transient-key)
("i" "Indent" icejam-mark-and-indent-whole-buffer)] (propertize ":\n" 'face 'transient-heading)))
["Other"
("m" "iMenu" lsp-ui-imenu)
("e" "Show Errors" flymake-show-buffer-diagnostics)]])
(transient-define-prefix icejam-history-menu () ("r" "Reload buffer" icejam-revert-buffer-no-confirm)
"Buffer History Commands." ("e" "Show errors" flymake-show-buffer-diagnostics)
["History"
("[" "Previous" previous-buffer)
("]" "Next" previous-buffer)])
(transient-define-prefix icejam-move-menu () ;; This only appears for emacs-lisp-mode
"Move Commands." ("d" "Explain thing at point" helpful-at-point :if-mode emacs-lisp-mode)
[""
["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" "Line" avy-goto-line)
("c" "Character" avy-goto-char-2)]])
(transient-define-prefix icejam-font-menu () ;; These only appear for LSP mode
"Font Commands." ("m" "LSP iMenu" lsp-ui-imenu
["" :if (lambda () (bound-and-true-p lsp-mode)))
["Everywhere" ("f" "Format buffer with LSP formatter" lsp-format-buffer
("s" "Adjust font size" global-text-scale-adjust)] :if (lambda () (bound-and-true-p lsp-mode)))
["In this buffer"
("i" "Bigger" (lambda () (interactive) (text-scale-increase 1))) ;; Finally, quit.
("d" "Smaller" (lambda () (interactive) (text-scale-decrease 1))) ("q" "Quit" keyboard-quit)]])
("r" "Reset" (lambda () (interactive) (text-scale-adjust 0)))]])
(defcustom icejam-language-transient-alist (defcustom icejam-language-transient-alist
'() '()
@ -131,22 +137,19 @@ You can pass MAYBE-MODE to find mode explicitly."
(transient-define-prefix icejam-command-palette () (transient-define-prefix icejam-command-palette ()
"All transient menus in one place." "All transient menus in one place."
["" ["All my stuff in one place\n"
["The thing you are editing" ["The thing you are editing"
("p" "Project" icejam-project-menu) ("p" "Project" icejam-project-menu)
("c" "Code" icejam-code-menu) ("c" "Code" icejam-code-menu)
("l" "Language" icejam-transient-for-lang)] ("l" "Language" icejam-transient-for-lang)
("r" "Revert Buffer" icejam-revert-buffer-no-confirm)]
["The editor itself" ["The editor itself"
("w" "Window" icejam-window-menu) ("b" "iBuffer" ibuffer)
("s" "History" icejam-history-menu) ("w" "Window" icejam-buffer-menu)]])
("f" "Font" icejam-font-menu)]])
(define-key icejam-keys-mode-map (kbd "C-c p") 'icejam-project-menu) (define-key icejam-keys-mode-map (kbd "C-c p") 'icejam-project-menu)
(define-key icejam-keys-mode-map (kbd "C-c c") 'icejam-code-menu) (define-key icejam-keys-mode-map (kbd "C-c c") 'icejam-code-menu)
(define-key icejam-keys-mode-map (kbd "C-c w") 'icejam-window-menu) (define-key icejam-keys-mode-map (kbd "C-c w") 'icejam-buffer-menu)
(define-key icejam-keys-mode-map (kbd "C-c s") 'icejam-history-menu)
(define-key icejam-keys-mode-map (kbd "C-c f") 'icejam-font-menu)
(define-key icejam-keys-mode-map (kbd "C-c m") 'icejam-move-menu)
(define-key icejam-keys-mode-map (kbd "C-c l") 'icejam-transient-for-lang) (define-key icejam-keys-mode-map (kbd "C-c l") 'icejam-transient-for-lang)
(define-key icejam-keys-mode-map (kbd "H-p") 'icejam-command-palette) (define-key icejam-keys-mode-map (kbd "H-p") 'icejam-command-palette)

View file

@ -9,20 +9,6 @@
(use-package lispy :ensure t :defer t) (use-package lispy :ensure t :defer t)
(transient-define-prefix icejam-elisp-lang-menu ()
"Elisp Buffer Commands."
[""
["Buffer"
("r" "Reload" icejam-revert-buffer-no-confirm)
("i" "Indent" icejam-mark-and-indent-whole-buffer)
("d" "Explain" helpful-at-point)
("e" "Show Errors" flymake-show-buffer-diagnostics)]]
[""
("q" "Quit" keyboard-quit)])
(add-to-list
'icejam-language-transient-alist '(emacs-lisp-mode . icejam-elisp-lang-menu))
(defun icejam-activate-emacs-lisp-mode () (defun icejam-activate-emacs-lisp-mode ()
"Goodies for editing Emacs files." "Goodies for editing Emacs files."

View file

@ -16,15 +16,15 @@
(use-package elixir-ts-mode :ensure t :defer t :after (elixir-format lsp-mode lsp-ui)) (use-package elixir-ts-mode :ensure t :defer t :after (elixir-format lsp-mode lsp-ui))
(transient-define-prefix icejam-elixir-lang-menu () (transient-define-prefix icejam-elixir-lang-menu ()
"Elixir Buffer Commands." [[:description
["" (lambda ()
["LSP" (concat (propertize "Code actions for " 'face 'transient-heading)
("m" "iMenu" lsp-ui-imenu)] (propertize (format "%s" major-mode) 'face 'transient-key)
["Buffer" (propertize ":\n" 'face 'transient-heading)))
("r" "Reload" icejam-revert-buffer-no-confirm) ("m" "LSP iMenu" lsp-ui-imenu)
("f" "Format" elixir-format) ("r" "Reload buffer" icejam-revert-buffer-no-confirm)
("i" "Indent" icejam-mark-and-indent-whole-buffer) ("f" "Format buffer with Elixir formatter" elixir-format)
("e" "Show Errors" flymake-show-buffer-diagnostics)]] ("e" "Show errors" flymake-show-buffer-diagnostics)]]
["" [""
("q" "Quit" keyboard-quit)]) ("q" "Quit" keyboard-quit)])