diff --git a/bindings.el b/bindings.el index 975d946..f7b8008 100644 --- a/bindings.el +++ b/bindings.el @@ -1,5 +1,335 @@ ;;; bindings.el -*- lexical-binding: t; -*- +;; left option is meta, right option is option +(setq ns-alternate-modifier 'meta) +(setq ns-right-alternate-modifier 'none) + +(map! :leader + "`" nil + ;; (:prefix ("m" . "")) ; bound locally + (:prefix-map ("!" . "checkers")) ; bound by flycheck + + :desc "M-x" ":" #'execute-extended-command + :desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer + :desc "Obsidian Quick Capture" "X" #'mnl/obsidian-capture + + :desc "Universal argument" "u" #'universal-argument + + + :desc "help" "h" help-map + :desc "Toggle last popup" "~" #'+popup/toggle + :desc "Find file" "." #'find-file + :desc "Switch workspace buffer" "," #'persp-switch-to-buffer + :desc "Switch buffer" "<" #'switch-to-buffer + :desc "Repeat" "'" #'vertico-repeat + + :desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point + :desc "Search project" "/" #'+default/search-project + + :desc "Find file in project" "SPC" #'projectile-find-file + + (:prefix-map ("RET" . "Bookmarks") + :desc "Jump to Bookmarks in Project" "SPC" #'bookmark-in-project-jump + :desc "All Bookmarks / New Bookmark" "RET" #'bookmark-jump + :desc "New bookmark" "m" #'bookmark-set + :desc "Delete bookmark" "d" #'bookmark-delete) + + (:prefix-map ("w" . "window") + :desc "ace-window" "w" #'ace-window + :desc "split vertical" "v" #'split-window-horizontally + :desc "split horizontal" "h" #'split-window-vertically + :desc "make taller" "+" #'enlarge-window + :desc "make taller" "-" #'shrink-window + :desc "make wider" ">" #'enlarge-window-horizontally + :desc "make narrower" "<" #'shrink-window-horizontally + :desc "delete current window" "d" #'delete-window + :desc "delete other windows" "o" #'delete-other-windows) + + ;; b --- buffer + (:prefix-map + ("b" . "buffer") + :desc "Toggle narrowing" "-" #'doom/toggle-narrow-buffer + :desc "Switch workspace buffer" "b" #'persp-switch-to-buffer + :desc "Switch buffer" "B" #'switch-to-buffer + :desc "ibuffer workspace" "I" #'+ibuffer/open-for-current-workspace + :desc "Clone buffer" "c" #'clone-indirect-buffer + :desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window + :desc "ibuffer" "i" #'ibuffer + :desc "Kill buffer" "k" #'kill-this-buffer + :desc "Kill all buffers" "K" #'doom/kill-all-buffers + :desc "Next buffer" "n" #'next-buffer + :desc "New empty buffer" "N" #'+default/new-buffer + :desc "Kill other buffers" "O" #'doom/kill-other-buffers + :desc "Previous buffer" "p" #'previous-buffer + :desc "Revert buffer" "r" #'revert-buffer + :desc "Rename buffer" "R" #'rename-buffer + :desc "Save buffer" "s" #'basic-save-buffer + :desc "Save buffer as root" "u" #'doom/sudo-save-buffer + :desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer + :desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer + :desc "Yank buffer" "y" #'+default/yank-buffer-contents + :desc "Bury buffer" "z" #'bury-buffer + :desc "Kill buried buffers" "Z" #'doom/kill-buried-buffers) + + (:prefix-map ("TAB" . "workspace") + :desc "Display tab bar" "TAB" #'+workspace/display + :desc "Switch workspace" "." #'+workspace/switch-to + :desc "Switch to last workspace" "`" #'+workspace/other + :desc "New workspace" "n" #'+workspace/new + :desc "New named workspace" "N" #'+workspace/new-named + :desc "Load workspace from file" "l" #'+workspace/load + :desc "Save workspace to file" "s" #'+workspace/save + :desc "Delete session" "x" #'+workspace/kill-session + :desc "Delete workspace" "d" #'+workspace/kill + :desc "Delete saved workspace" "D" #'+workspace/delete + :desc "Rename workspace" "r" #'+workspace/rename + :desc "Restore last session" "R" #'+workspace/restore-last-session + :desc "Next workspace" "]" #'+workspace/switch-right + :desc "Previous workspace" "[" #'+workspace/switch-left + :desc "Switch to 1st workspace" "1" #'+workspace/switch-to-0 + :desc "Switch to 2nd workspace" "2" #'+workspace/switch-to-1 + :desc "Switch to 3rd workspace" "3" #'+workspace/switch-to-2 + :desc "Switch to 4th workspace" "4" #'+workspace/switch-to-3 + :desc "Switch to 5th workspace" "5" #'+workspace/switch-to-4 + :desc "Switch to 6th workspace" "6" #'+workspace/switch-to-5 + :desc "Switch to 7th workspace" "7" #'+workspace/switch-to-6 + :desc "Switch to 8th workspace" "8" #'+workspace/switch-to-7 + :desc "Switch to 9th workspace" "9" #'+workspace/switch-to-8 + :desc "Switch to final workspace" "0" #'+workspace/switch-to-final) + + (:prefix-map + ("f" . "file") + :desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig + :desc "Copy this file" "C" #'doom/copy-this-file + :desc "Find directory" "d" #'+default/dired + :desc "Delete this file" "D" #'doom/delete-this-file + :desc "Find file in emacs config" "e" #'doom/find-file-in-emacsd + :desc "Browse emacs config" "E" #'doom/browse-in-emacsd + :desc "Find file" "f" #'find-file + :desc "Find file from here" "F" #'+default/find-file-under-here + :desc "Find file in private config" "p" #'doom/find-file-in-private-config + :desc "Browse private config" "P" #'doom/open-private-config + :desc "Recent files" "r" #'recentf-open-files + :desc "Rename/move file" "R" #'doom/move-this-file + :desc "Save file" "s" #'save-buffer + :desc "Save file as..." "S" #'write-file + :desc "Yank file path" "y" #'+default/yank-buffer-path + :desc "Yank file path from project" "Y" #'+default/yank-buffer-path-relative-to-project) + + (:prefix-map + ("p" . "project") + :desc "Browse project" "." #'+default/browse-project + :desc "Browse other project" ">" #'doom/browse-in-other-project + :desc "Run cmd in project root" "!" #'projectile-run-shell-command-in-root + :desc "Async cmd in project root" "&" #'projectile-run-async-shell-command-in-root + :desc "Add new project" "a" #'projectile-add-known-project + :desc "Switch to project buffer" "b" #'projectile-switch-to-buffer + :desc "Compile in project" "c" #'projectile-compile-project + :desc "Repeat last command" "C" #'projectile-repeat-last-command + :desc "Remove known project" "d" #'projectile-remove-known-project + :desc "Discover projects in folder" "D" #'+default/discover-projects + :desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals + :desc "Find file in project" "f" #'projectile-find-file + :desc "Find file in other project" "F" #'doom/find-file-in-other-project + :desc "Configure project" "g" #'projectile-configure-project + :desc "Invalidate current project cache" "i" #'projectile-invalidate-cache + :desc "Kill project buffers" "k" #'projectile-kill-buffers + :desc "Find other file" "o" #'projectile-find-other-file + :desc "Switch project" "p" #'projectile-switch-project + :desc "Find recent project files" "r" #'projectile-recentf + :desc "Run project" "R" #'projectile-run-project + :desc "Save project files" "s" #'projectile-save-project-buffers + :desc "List project todos" "t" #'magit-todos-list + :desc "Test project" "T" #'projectile-test-project + :desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer + :desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer + :desc "Justfile Commands" "j" #'justl) + + ;; i --- insert + (:prefix-map + ("i" . "insert") + :desc "Emoji" "e" #'emoji-search + :desc "Current file name" "f" #'+default/insert-file-path + :desc "Current file path" "F" (cmd!! #'+default/insert-file-path t) + :desc "Snippet" "s" #'+default/insert-snippet + :desc "Unicode" "u" #'insert-char + :desc "From clipboard" "y" #'+default/yank-pop) + + ;; s --- search + (:prefix-map ("s" . "search") + :desc "Search buffer" "b" #'+default/search-buffer + :desc "Search all open buffers" "B" (cmd!! #'consult-line-multi 'all-buffers) + :desc "Search current directory" "d" #'+default/search-cwd + :desc "Search other directory" "D" #'+default/search-other-cwd + :desc "Search emacs config" "e" #'+default/search-emacsd + :desc "Jump to symbol" "i" #'imenu + :desc "Jump to visible link" "l" #'link-hint-open-link + :desc "Jump to link" "L" #'ffap-menu + :desc "Jump to bookmark" "m" #'bookmark-jump + :desc "Look up online" "o" #'+lookup/online + :desc "Look up online (w/ prompt)" "O" #'+lookup/online-select + :desc "Look up in local docsets" "k" #'+lookup/in-docsets + :desc "Look up in all docsets" "K" #'+lookup/in-all-docsets + :desc "Search project" "p" #'+default/search-project + :desc "Search other project" "P" #'+default/search-other-project + :desc "Search buffer" "s" #'+default/search-buffer + :desc "Search buffer for thing at point" "S" #'+vertico/search-symbol-at-point + :desc "Dictionary" "t" #'+lookup/dictionary-definition + :desc "Thesaurus" "T" #'+lookup/synonyms) + + ;; t --- toggle + (:prefix-map ("t" . "toggle") + :desc "Artist mode" "a" #'artist-mode + :desc "Follow mode" "x" #'follow-mode + :desc "Big mode" "b" #'doom-big-font-mode + :desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode + (:when (modulep! :checkers syntax) + :desc "Flycheck" "f" #'flycheck-mode) + :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen + (:when (modulep! :ui indent-guides) + :desc "Indent guides" "i" #'highlight-indent-guides-mode) + :desc "Indent style" "I" #'doom/toggle-indent-style + :desc "Line numbers" "l" #'doom/toggle-line-numbers + (:when (modulep! :ui minimap) + :desc "Minimap" "m" #'minimap-mode) + :desc "Read-only mode" "r" #'read-only-mode + (:when (modulep! :checkers spell +flyspell) + :desc "Spell checker" "s" #'flyspell-mode) + :desc "Visible mode" "v" #'visible-mode + :desc "Soft line wrapping" "w" #'+word-wrap-mode + :desc "PlatformIO Mode Toggle" "o" #'platformio-mode) + + (:prefix-map ("o" . "open") + :desc "Process List" "a" #'list-processes + :desc "Start debugger" "d" #'+debugger/start + :desc "New frame" "f" #'make-frame + :desc "Select frame" "F" #'select-frame-by-name + :desc "REPL" "r" #'+eval/open-repl-other-window + :desc "REPL (same window)" "R" #'+eval/open-repl-same-window + :desc "Dired" "-" #'dired-jump + :desc "Project sidebar" "p" #'+treemacs/toggle + :desc "Find file in project sidebar" "P" #'treemacs-find-file + :desc "Toggle vterm popup" "v" #'+vterm/toggle + :desc "Open vterm here" "V" #'+vterm/here + :desc "mu4e" "m" #'=mu4e) + + (:prefix-map ("n" . "notes") + :desc "Bibliographic notes" "b" #'citar-open-notes + :desc "Jump" "f" #'obsidian-jump + :desc "Search" "s" #'obsidian-search + :desc "Tag Search" "m" #'obsidian-tag-find + :desc "Daily Note" "n" #'mnl/obsidian-capture + :desc "Insert Wikilink" "w" #'obsidian-insert-wikilink + :desc "Backlink Jump" "j" #'obsidian-backlink-jump + :desc "Follow Link" "l" #'obsidian-follow-link-at-point + :desc "Update" "u" #'obsidian-update) + + (:prefix-map ("g" . "git") + :desc "Revert file" "R" #'vc-revert + :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill + :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage + (:when (modulep! :ui vc-gutter) + :desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk + :desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk + :desc "Git time machine" "t" #'git-timemachine-toggle + :desc "Jump to next hunk" "]" #'+vc-gutter/next-hunk + :desc "Jump to previous hunk" "[" #'+vc-gutter/previous-hunk) + (:when (modulep! :tools magit) + :desc "Magit dispatch" "/" #'magit-dispatch + :desc "Magit file dispatch" "." #'magit-file-dispatch + :desc "Magit switch branch" "b" #'magit-branch-checkout + :desc "Magit status" "g" #'magit-status + :desc "Magit status here" "G" #'magit-status-here + :desc "Magit file delete" "D" #'magit-file-delete + :desc "Magit blame" "B" #'magit-blame-addition + :desc "Magit clone" "C" #'magit-clone + :desc "Magit fetch" "F" #'magit-fetch + :desc "Magit buffer log" "L" #'magit-log-buffer-file + :desc "Git stage file" "S" #'magit-stage-file + :desc "Git unstage file" "U" #'magit-unstage-file + :desc "Git push current" "P" #'magit-push-implicitly + :desc "Git push with options" "p" #'magit-push + (:prefix ("f" . "find") + :desc "Find file" "f" #'magit-find-file + :desc "Find gitconfig file" "g" #'magit-find-git-config-file + :desc "Find commit" "c" #'magit-show-commit + :desc "Find issue" "i" #'forge-visit-issue + :desc "Find pull request" "p" #'forge-visit-pullreq) + (:prefix ("o" . "open in browser") + :desc "Browse file or region" "o" #'+vc/browse-at-remote + :desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage + :desc "Browse remote" "r" #'forge-browse-remote + :desc "Browse commit" "c" #'forge-browse-commit + :desc "Browse an issue" "i" #'forge-browse-issue + :desc "Browse a pull request" "p" #'forge-browse-pullreq + :desc "Browse issues" "I" #'forge-browse-issues + :desc "Browse pull requests" "P" #'forge-browse-pullreqs) + (:prefix ("l" . "list") + :desc "List repositories" "r" #'magit-list-repositories + :desc "List submodules" "s" #'magit-list-submodules + :desc "List issues" "i" #'forge-list-issues + :desc "List pull requests" "p" #'forge-list-pullreqs + :desc "List notifications" "n" #'forge-list-notifications) + (:prefix ("c" . "create") + :desc "Initialize repo" "r" #'magit-init + :desc "Clone repo" "R" #'magit-clone + :desc "Commit" "c" #'magit-commit-create + :desc "Fixup" "f" #'magit-commit-fixup + :desc "Branch" "b" #'magit-branch-and-checkout + :desc "Issue" "i" #'forge-create-issue + :desc "Pull request" "p" #'forge-create-pullreq))) + + ;; code map + (:prefix-map ("c" . "code") + :desc "LSP Execute code action" "a" #'eglot-code-actions + :desc "LSP Rename" "r" #'eglot-rename + :desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols + :desc "Compile" "c" #'compile + :desc "Recompile" "C" #'recompile + :desc "Jump to definition" "d" #'+lookup/definition + :desc "Jump to references" "D" #'+lookup/references + :desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region + :desc "Evaluate & replace region" "E" #'+eval:replace-region + :desc "Toggle Fold" "z" #'+fold/toggle + :desc "Format buffer/region" "f" #'+format/region-or-buffer + :desc "Find implementations" "i" #'+lookup/implementations + :desc "Jump to documentation" "k" #'+lookup/documentation + :desc "Send to repl" "s" #'+eval/send-region-to-repl + :desc "Find type definition" "t" #'+lookup/type-definition + :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace + :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines + :desc "List errors" "x" #'+default/diagnostics + :desc "Spaces -> Tabs" "" #'tabify + :desc "Tabs -> Spaces" "" #'untabify + :desc "Diff buffer and file" "b" #'diff-buffer-with-file + (:prefix ("-" . "String Case") + :desc "cycle" "~" #'string-inflection-all-cycle + :desc "CamelCase" "c" #'string-inflection-camelcase + :desc "downCase" "d" #'string-inflection-lower-camelcase + :desc "kebab-case" "-" #'string-inflection-kebab-case + :desc "under_score" "_" #'string-inflection-underscore + :desc "Upper_Score" "u" #'string-inflection-capital-underscore + :desc "UP_CASE" "U" #'string-inflection-upcase + :desc "ALL CAPS" "A" #'upcase-dwim + :desc "all lower" "a" #'downcase-dwim + :desc "Capitalize Sentence" "s" #'capitalize-dwim)) + + + ;; q --- quit/restart + (:prefix-map ("q" . "quit/session") + :desc "Restart emacs server" "d" #'+default/restart-server + :desc "Delete frame" "f" #'delete-frame + :desc "Clear current frame" "F" #'doom/kill-all-buffers + :desc "Kill Emacs (and daemon)" "K" #'save-buffers-kill-emacs + :desc "Quit Emacs" "q" #'kill-emacs + :desc "Save and quit Emacs" "Q" #'save-buffers-kill-terminal + :desc "Quick save current session" "s" #'doom/quicksave-session + :desc "Restore last session" "l" #'doom/quickload-session + :desc "Save session to file" "S" #'doom/save-session + :desc "Restore session from file" "L" #'doom/load-session + :desc "Restart & restore Emacs" "r" #'doom/restart-and-restore + :desc "Restart Emacs" "R" #'doom/restart)) + ;; some helpful general keys (map! :map 'override "C-c" #'kill-ring-save @@ -12,7 +342,7 @@ "C-S-E" #'+vertico/embark-export-write "C-w" #'kill-buffer "C-f" #'+default/search-buffer - "C-g" #'vertico-repeat + "C-g" #'vertico-repeat ; TODO make this grab the last search term and re-search instead "C-s" #'save-buffer "C-;" #'comment-dwim "C-/" #'comment-line @@ -33,11 +363,11 @@ "M-x" #'execute-extended-command "" #'beginning-of-buffer "" #'end-of-buffer - "C-S-" #'split-window-vertically + "C-" #'split-window-vertically "C-S-" #'split-window-horizontally - "C-" #'+fold/toggle "C-" #'sp-backward-delete-word - "C-" #'sp-delete-word) + "C-" #'sp-delete-word + "C-M-" #'my/call-localleader) (map! (:when (modulep! :ui popup) "C-`" #'+popup/toggle @@ -95,381 +425,3 @@ ;; dired (map! :map dired-mode-map "\\" #'dired-up-directory) - -;; obsidian -(map! :leader - :desc "Obsidian Quick Capture" - "X" #'mnl/obsidian-capture) - -(map! :leader - :prefix "n" - :desc "Jump" "f" #'obsidian-jump - :desc "Search" "s" #'obsidian-search - :desc "Tag Search" "m" #'obsidian-tag-find - :desc "Daily Note" "n" #'mnl/obsidian-capture - :desc "Insert Wikilink" "w" #'obsidian-insert-wikilink - :desc "Backlink Jump" "j" #'obsidian-backlink-jump - :desc "Follow Link" "l" #'obsidian-follow-link-at-point - :desc "Update" "u" #'obsidian-update - "a" nil - "d" nil) - -;; left option is meta, right option is option -(setq ns-alternate-modifier 'meta) -(setq ns-right-alternate-modifier 'none) - -(map! :leader - "`" nil - ;; (:prefix ("m" . "")) ; bound locally - (:prefix-map ("!" . "checkers")) ; bound by flycheck - - :desc "M-x" ":" #'execute-extended-command - :desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer - :desc "Universal argument" "u" #'universal-argument - - - :desc "help" "h" help-map - :desc "Toggle last popup" "~" #'+popup/toggle - :desc "Find file" "." #'find-file - :desc "Switch workspace buffer" "," #'persp-switch-to-buffer - :desc "Switch buffer" "<" #'switch-to-buffer - :desc "Repeat" "'" #'vertico-repeat - - :desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point - :desc "Search project" "/" #'+default/search-project - - :desc "Find file in project" "SPC" #'projectile-find-file - - (:prefix-map ("RET" . "Bookmarks") - :desc "Jump to Bookmarks in Project" "SPC" #'bookmark-in-project-jump - :desc "All Bookmarks / New Bookmark" "RET" #'bookmark-jump - :desc "New bookmark" "m" #'bookmark-set - :desc "Delete bookmark" "d" #'bookmark-delete) - - (:prefix-map ("w" . "window") - :desc "ace-window" "w" #'ace-window - :desc "split vertical" "v" #'split-window-horizontally - :desc "split horizontal" "h" #'split-window-vertically - :desc "make taller" "+" #'enlarge-window - :desc "make taller" "-" #'shrink-window - :desc "make wider" ">" #'enlarge-window-horizontally - :desc "make narrower" "<" #'shrink-window-horizontally - :desc "delete current window" "d" #'delete-window - :desc "delete other windows" "o" #'delete-other-windows) - - ;; b --- buffer - (:prefix-map - ("b" . "buffer") - :desc "Toggle narrowing" "-" #'doom/toggle-narrow-buffer - :desc "Previous buffer" "[" #'previous-buffer - :desc "Next buffer" "]" #'next-buffer - :desc "Switch workspace buffer" "b" #'persp-switch-to-buffer - :desc "Switch buffer" "B" #'switch-to-buffer - :desc "ibuffer workspace" "I" #'+ibuffer/open-for-current-workspace - :desc "Clone buffer" "c" #'clone-indirect-buffer - :desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window - :desc "ibuffer" "i" #'ibuffer - :desc "Kill buffer" "k" #'kill-this-buffer - :desc "Kill all buffers" "K" #'doom/kill-all-buffers - :desc "Next buffer" "n" #'next-buffer - :desc "New empty buffer" "N" #'+default/new-buffer - :desc "Kill other buffers" "O" #'doom/kill-other-buffers - :desc "Previous buffer" "p" #'previous-buffer - :desc "Revert buffer" "r" #'revert-buffer - :desc "Rename buffer" "R" #'rename-buffer - :desc "Save buffer" "s" #'basic-save-buffer - :desc "Save buffer as root" "u" #'doom/sudo-save-buffer - :desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer - :desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer - :desc "Yank buffer" "y" #'+default/yank-buffer-contents - :desc "Bury buffer" "z" #'bury-buffer - :desc "Kill buried buffers" "Z" #'doom/kill-buried-buffers) - - (:prefix-map ("TAB" . "workspace") - :desc "Display tab bar" "TAB" #'+workspace/display - :desc "Switch workspace" "." #'+workspace/switch-to - :desc "Switch to last workspace" "`" #'+workspace/other - :desc "New workspace" "n" #'+workspace/new - :desc "New named workspace" "N" #'+workspace/new-named - :desc "Load workspace from file" "l" #'+workspace/load - :desc "Save workspace to file" "s" #'+workspace/save - :desc "Delete session" "x" #'+workspace/kill-session - :desc "Delete workspace" "d" #'+workspace/kill - :desc "Delete saved workspace" "D" #'+workspace/delete - :desc "Rename workspace" "r" #'+workspace/rename - :desc "Restore last session" "R" #'+workspace/restore-last-session - :desc "Next workspace" "]" #'+workspace/switch-right - :desc "Previous workspace" "[" #'+workspace/switch-left - :desc "Switch to 1st workspace" "1" #'+workspace/switch-to-0 - :desc "Switch to 2nd workspace" "2" #'+workspace/switch-to-1 - :desc "Switch to 3rd workspace" "3" #'+workspace/switch-to-2 - :desc "Switch to 4th workspace" "4" #'+workspace/switch-to-3 - :desc "Switch to 5th workspace" "5" #'+workspace/switch-to-4 - :desc "Switch to 6th workspace" "6" #'+workspace/switch-to-5 - :desc "Switch to 7th workspace" "7" #'+workspace/switch-to-6 - :desc "Switch to 8th workspace" "8" #'+workspace/switch-to-7 - :desc "Switch to 9th workspace" "9" #'+workspace/switch-to-8 - :desc "Switch to final workspace" "0" #'+workspace/switch-to-final) - - (:prefix-map - ("f" . "file") - :desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig - :desc "Copy this file" "C" #'doom/copy-this-file - :desc "Find directory" "d" #'+default/dired - :desc "Delete this file" "D" #'doom/delete-this-file - :desc "Find file in emacs.d" "e" #'doom/find-file-in-emacsd - :desc "Browse emacs.d" "E" #'doom/browse-in-emacsd - :desc "Find file" "f" #'find-file - :desc "Find file from here" "F" #'+default/find-file-under-here - :desc "Find file in private config" "p" #'doom/find-file-in-private-config - :desc "Browse private config" "P" #'doom/open-private-config - :desc "Recent files" "r" #'recentf-open-files - :desc "Rename/move file" "R" #'doom/move-this-file - :desc "Save file" "s" #'save-buffer - :desc "Save file as..." "S" #'write-file - :desc "Sudo find file" "u" #'doom/sudo-find-file - :desc "Sudo this file" "U" #'doom/sudo-this-file - :desc "Yank file path" "y" #'+default/yank-buffer-path - :desc "Yank file path from project" "Y" #'+default/yank-buffer-path-relative-to-project) - - (:prefix-map - ("p" . "project") - :desc "Browse project" "." #'+default/browse-project - :desc "Browse other project" ">" #'doom/browse-in-other-project - :desc "Run cmd in project root" "!" #'projectile-run-shell-command-in-root - :desc "Async cmd in project root" "&" #'projectile-run-async-shell-command-in-root - :desc "Add new project" "a" #'projectile-add-known-project - :desc "Switch to project buffer" "b" #'projectile-switch-to-buffer - :desc "Compile in project" "c" #'projectile-compile-project - :desc "Repeat last command" "C" #'projectile-repeat-last-command - :desc "Remove known project" "d" #'projectile-remove-known-project - :desc "Discover projects in folder" "D" #'+default/discover-projects - :desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals - :desc "Find file in project" "f" #'projectile-find-file - :desc "Find file in other project" "F" #'doom/find-file-in-other-project - :desc "Configure project" "g" #'projectile-configure-project - :desc "Invalidate project cache" "i" #'projectile-invalidate-cache - :desc "Kill project buffers" "k" #'projectile-kill-buffers - :desc "Find other file" "o" #'projectile-find-other-file - :desc "Switch project" "p" #'projectile-switch-project - :desc "Find recent project files" "r" #'projectile-recentf - :desc "Run project" "R" #'projectile-run-project - :desc "Save project files" "s" #'projectile-save-project-buffers - :desc "List project todos" "t" #'magit-todos-list - :desc "Test project" "T" #'projectile-test-project - :desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer - :desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer - :desc "Justfile Commands" "j" #'justl) - - ;; i --- insert - (:prefix-map - ("i" . "insert") - :desc "Emoji" "e" #'emoji-search - :desc "Current file name" "f" #'+default/insert-file-path - :desc "Current file path" "F" (cmd!! #'+default/insert-file-path t) - :desc "Snippet" "s" #'+default/insert-snippet - :desc "Unicode" "u" #'insert-char - :desc "From clipboard" "y" #'+default/yank-pop) - - ;; s --- search - (:prefix-map ("s" . "search") - :desc "Search buffer" "b" #'+default/search-buffer - :desc "Search all open buffers" "B" (cmd!! #'consult-line-multi 'all-buffers) - :desc "Search current directory" "d" #'+default/search-cwd - :desc "Search other directory" "D" #'+default/search-other-cwd - :desc "Search .emacs.d" "e" #'+default/search-emacsd - :desc "Jump to symbol" "i" #'imenu - :desc "Jump to visible link" "l" #'link-hint-open-link - :desc "Jump to link" "L" #'ffap-menu - :desc "Jump to bookmark" "m" #'bookmark-jump - :desc "Look up online" "o" #'+lookup/online - :desc "Look up online (w/ prompt)" "O" #'+lookup/online-select - :desc "Look up in local docsets" "k" #'+lookup/in-docsets - :desc "Look up in all docsets" "K" #'+lookup/in-all-docsets - :desc "Search project" "p" #'+default/search-project - :desc "Search other project" "P" #'+default/search-other-project - :desc "Search buffer" "s" #'+default/search-buffer - :desc "Search buffer for thing at point" "S" #'+vertico/search-symbol-at-point - :desc "Dictionary" "t" #'+lookup/dictionary-definition - :desc "Thesaurus" "T" #'+lookup/synonyms) - - ;; t --- toggle - (:prefix-map ("t" . "toggle") - :desc "Artist mode" "a" #'artist-mode - :desc "Follow mode" "x" #'follow-mode - :desc "Big mode" "b" #'doom-big-font-mode - :desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode - :desc "Flymake" "f" #'flymake-mode - (:when (modulep! :checkers syntax) - :desc "Flycheck" "f" #'flycheck-mode) - :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen - (:when (modulep! :ui indent-guides) - :desc "Indent guides" "i" #'highlight-indent-guides-mode) - :desc "Indent style" "I" #'doom/toggle-indent-style - :desc "Line numbers" "l" #'doom/toggle-line-numbers - (:when (modulep! :ui minimap) - :desc "Minimap" "m" #'minimap-mode) - (:when (modulep! :lang org +present) - :desc "org-tree-slide mode" "p" #'org-tree-slide-mode) - :desc "Read-only mode" "r" #'read-only-mode - (:when (modulep! :checkers spell +flyspell) - :desc "Spell checker" "s" #'flyspell-mode) - :desc "Visible mode" "v" #'visible-mode - :desc "Soft line wrapping" "w" #'visual-line-mode - (:when (modulep! :editor word-wrap) - :desc "Soft line wrapping" "w" #'+word-wrap-mode) - :desc "PlatformIO Mode Toggle" "o" #'platformio-mode) - - (:prefix-map ("o" . "open") - :desc "Process List" "a" #'list-processes - :desc "Start debugger" "d" #'+debugger/start - :desc "New frame" "f" #'make-frame - :desc "Select frame" "F" #'select-frame-by-name - :desc "REPL" "r" #'+eval/open-repl-other-window - :desc "REPL (same window)" "R" #'+eval/open-repl-same-window - :desc "Dired" "-" #'dired-jump - (:when (modulep! :ui treemacs) - :desc "Project sidebar" "p" #'+treemacs/toggle - :desc "Find file in project sidebar" "P" #'treemacs-find-file) - (:when (modulep! :term vterm) - :desc "Toggle vterm popup" "v" #'+vterm/toggle - :desc "Open vterm here" "V" #'+vterm/here) - (:when (modulep! :os macos) - :desc "Reveal in Finder" "o" #'+macos/reveal-in-finder - :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder - :desc "Open in Kitty" "k" #'terminal-here - :desc "Open project root in Kitty" "K" #'terminal-here-project-launch) - (:when (modulep! :email mu4e) - :desc "mu4e" "m" #'=mu4e)) - - (:prefix-map ("n" . "notes") - :desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point - (:when (modulep! :tools biblio) - :desc "Bibliographic notes" "b" #'citar-open-notes) - - :desc "Find file in notes" "f" #'+default/find-in-notes - :desc "Browse notes" "F" #'+default/browse-notes) - - (:prefix-map ("g" . "git") - :desc "Revert file" "R" #'vc-revert - :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill - :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage - (:when (modulep! :ui vc-gutter) - :desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk - :desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk - :desc "Git time machine" "t" #'git-timemachine-toggle - :desc "Jump to next hunk" "]" #'+vc-gutter/next-hunk - :desc "Jump to previous hunk" "[" #'+vc-gutter/previous-hunk) - (:when (modulep! :tools magit) - :desc "Magit dispatch" "/" #'magit-dispatch - :desc "Magit file dispatch" "." #'magit-file-dispatch - :desc "Forge dispatch" "'" #'forge-dispatch - :desc "Magit switch branch" "b" #'magit-branch-checkout - :desc "Magit status" "g" #'magit-status - :desc "Magit status here" "G" #'magit-status-here - :desc "Magit file delete" "D" #'magit-file-delete - :desc "Magit blame" "B" #'magit-blame-addition - :desc "Magit clone" "C" #'magit-clone - :desc "Magit fetch" "F" #'magit-fetch - :desc "Magit buffer log" "L" #'magit-log-buffer-file - :desc "Git stage file" "S" #'magit-stage-file - :desc "Git unstage file" "U" #'magit-unstage-file - :desc "Git push current" "P" #'magit-push-implicitly - :desc "Git push with options" "p" #'magit-push - (:prefix ("f" . "find") - :desc "Find file" "f" #'magit-find-file - :desc "Find gitconfig file" "g" #'magit-find-git-config-file - :desc "Find commit" "c" #'magit-show-commit - :desc "Find issue" "i" #'forge-visit-issue - :desc "Find pull request" "p" #'forge-visit-pullreq) - (:prefix ("o" . "open in browser") - :desc "Browse file or region" "o" #'+vc/browse-at-remote - :desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage - :desc "Browse remote" "r" #'forge-browse-remote - :desc "Browse commit" "c" #'forge-browse-commit - :desc "Browse an issue" "i" #'forge-browse-issue - :desc "Browse a pull request" "p" #'forge-browse-pullreq - :desc "Browse issues" "I" #'forge-browse-issues - :desc "Browse pull requests" "P" #'forge-browse-pullreqs) - (:prefix ("l" . "list") - :desc "List repositories" "r" #'magit-list-repositories - :desc "List submodules" "s" #'magit-list-submodules - :desc "List issues" "i" #'forge-list-issues - :desc "List pull requests" "p" #'forge-list-pullreqs - :desc "List notifications" "n" #'forge-list-notifications) - (:prefix ("c" . "create") - :desc "Initialize repo" "r" #'magit-init - :desc "Clone repo" "R" #'magit-clone - :desc "Commit" "c" #'magit-commit-create - :desc "Fixup" "f" #'magit-commit-fixup - :desc "Branch" "b" #'magit-branch-and-checkout - :desc "Issue" "i" #'forge-create-issue - :desc "Pull request" "p" #'forge-create-pullreq))) - - ;; code map - (:prefix-map - ("c" . "code") - (:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot))) - :desc "LSP Execute code action" "a" #'lsp-execute-code-action - :desc "LSP Organize imports" "o" #'lsp-organize-imports - :desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols - :desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces) - (:when (modulep! :ui treemacs +lsp) - :desc "Errors list" "X" #'lsp-treemacs-errors-list - :desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy - :desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t) - :desc "References tree" "R" (cmd!! #'lsp-treemacs-references t) - :desc "Symbols" "S" #'lsp-treemacs-symbols) - :desc "LSP" "l" #'+default/lsp-command-map - :desc "LSP Rename" "r" #'lsp-rename) - (:when (modulep! :tools lsp +eglot) - :desc "LSP Execute code action" "a" #'eglot-code-actions - :desc "LSP Rename" "r" #'eglot-rename - :desc "LSP Find declaration" "j" #'eglot-find-declaration - (:when (modulep! :completion vertico) - :desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols)) - :desc "Compile" "c" #'compile - :desc "Recompile" "C" #'recompile - :desc "Jump to definition" "d" #'+lookup/definition - :desc "Jump to references" "D" #'+lookup/references - :desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region - :desc "Evaluate & replace region" "E" #'+eval:replace-region - :desc "Toggle Fold" "z" #'+fold/toggle - :desc "Format buffer/region" "f" #'+format/region-or-buffer - :desc "Find implementations" "i" #'+lookup/implementations - :desc "Jump to documentation" "k" #'+lookup/documentation - :desc "Send to repl" "s" #'+eval/send-region-to-repl - :desc "Find type definition" "t" #'+lookup/type-definition - :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace - :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines - :desc "List errors" "x" #'+default/diagnostics - :desc "Spaces -> Tabs" "" #'tabify - :desc "Tabs -> Spaces" "" #'untabify - :desc "Diff buffer and file" "b" #'diff-buffer-with-file - (:prefix ("-" . "String Case") - :desc "cycle" "~" #'string-inflection-all-cycle - :desc "CamelCase" "c" #'string-inflection-camelcase - :desc "downCase" "d" #'string-inflection-lower-camelcase - :desc "kebab-case" "-" #'string-inflection-kebab-case - :desc "under_score" "_" #'string-inflection-underscore - :desc "Upper_Score" "u" #'string-inflection-capital-underscore - :desc "UP_CASE" "U" #'string-inflection-upcase - :desc "ALL CAPS" "A" #'upcase-dwim - :desc "all lower" "a" #'downcase-dwim - :desc "Capitalize Sentence" "s" #'capitalize-dwim)) - - - ;; q --- quit/restart - (:prefix-map ("q" . "quit/session") - :desc "Restart emacs server" "d" #'+default/restart-server - :desc "Delete frame" "f" #'delete-frame - :desc "Clear current frame" "F" #'doom/kill-all-buffers - :desc "Kill Emacs (and daemon)" "K" #'save-buffers-kill-emacs - :desc "Quit Emacs" "q" #'kill-emacs - :desc "Save and quit Emacs" "Q" #'save-buffers-kill-terminal - :desc "Quick save current session" "s" #'doom/quicksave-session - :desc "Restore last session" "l" #'doom/quickload-session - :desc "Save session to file" "S" #'doom/save-session - :desc "Restore session from file" "L" #'doom/load-session - :desc "Restart & restore Emacs" "r" #'doom/restart-and-restore - :desc "Restart Emacs" "R" #'doom/restart)) diff --git a/mu4e-config.el b/mu4e-config.el index e718534..0fda0af 100644 --- a/mu4e-config.el +++ b/mu4e-config.el @@ -102,7 +102,7 @@ ;; change the prefiew key for compose so you don't open a preview of every file when selecting files to attach (setq consult-mu-compose-preview-key "M-o") ;; pick a key to bind to consult-mu-compose-attach in embark-file-map - (setq consult-mu-embark-attach-file-key "C-a") + (setq consult-mu-embark-attach-file-key "M-a") (setq consult-mu-contacts-ignore-list '("^.*no.*reply.*")) (setq consult-mu-contacts-ignore-case-fold-search t) (consult-mu-compose-embark-bind-attach-file-key) @@ -217,15 +217,13 @@ (:maildir "/matt@emenel.ca/Drafts" :key ?2 :name "Drafts/matt@emenel.ca") (:maildir "/matt@emenel.ca/Sent" :key ?3 :name "Sent/matt@emenel.ca") (:maildir "/matt@emenel.ca/Spam" :key ?4 :name "Spam/matt@emenel.ca") - (:maildir "/admin@studyoftime.org/Inbox" :key ?5 :name "Inbox/admin@studyoftime.org") - (:maildir "/admin@studyoftime.org/Drafts" :key ?6 :name "Drafts/admin@studyoftime.org") - (:maildir "/admin@studyoftime.org/Sent" :key ?7 :name "Sent/admin@studyoftime.org") - (:maildir "/admin@studyoftime.org/Spam" :key ?8 :name "Spam/admin@studyoftime.org"))) + (:maildir "/matt@emenel.ca/Archive" :key ?5 :name "Archive/matt@emenel.ca") + (:maildir "/admin@studyoftime.org/Inbox" :key ?6 :name "Inbox/admin@studyoftime.org") + (:maildir "/admin@studyoftime.org/Drafts" :key ?7 :name "Drafts/admin@studyoftime.org") + (:maildir "/admin@studyoftime.org/Sent" :key ?8 :name "Sent/admin@studyoftime.org") + (:maildir "/admin@studyoftime.org/Spam" :key ?9 :name "Spam/admin@studyoftime.org"))) (setq mu4e-alert-email-notification-types '(count)) - ;; FIXME: workaround for issue with doom mu4e not expanding ~ - ;; (setq mu4e-get-mail-command "mbsync -a") - (add-hook! mu4e-compose-mode (ws-butler-mode -1))) diff --git a/packages.el b/packages.el index f70407b..6402735 100644 --- a/packages.el +++ b/packages.el @@ -21,7 +21,7 @@ (unpin! use-package) ;; (unpin! geiser) (unpin! vterm) -;;(unpin! mu4e) +;; (unpin! mu4e) (package! meow) (package! direnv)