From 6ae86b5969b444dbeefd112e039c1ffca8fac67f Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Thu, 30 Mar 2023 14:58:27 -0400 Subject: [PATCH] a few keybinding changes --- bindings.el | 38 +++++++++++++++++++++----------------- init.el | 4 ++-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/bindings.el b/bindings.el index 9571af6..f9438c4 100644 --- a/bindings.el +++ b/bindings.el @@ -3,24 +3,24 @@ (setq doom-localleader-alt-key "C-SPC") (map! (:when (modulep! :ui popup) - "C-`" #'+popup/toggle - "C-~" #'+popup/raise - "C-x p" #'+popup/other) + "C-`" #'+popup/toggle + "C-~" #'+popup/raise + "C-x p" #'+popup/other) (:when (modulep! :ui workspaces) - (:when IS-MAC - "s-t" #'+workspace/new - "s-T" #'+workspace/display - "s-1" #'+workspace/switch-to-0 - "s-2" #'+workspace/switch-to-1 - "s-3" #'+workspace/switch-to-2 - "s-4" #'+workspace/switch-to-3 - "s-5" #'+workspace/switch-to-4 - "s-6" #'+workspace/switch-to-5 - "s-7" #'+workspace/switch-to-6 - "s-8" #'+workspace/switch-to-7 - "s-9" #'+workspace/switch-to-8 - "s-0" #'+workspace/switch-to-final))) + (:when IS-MAC + "s-t" #'+workspace/new + "s-T" #'+workspace/display + "s-1" #'+workspace/switch-to-0 + "s-2" #'+workspace/switch-to-1 + "s-3" #'+workspace/switch-to-2 + "s-4" #'+workspace/switch-to-3 + "s-5" #'+workspace/switch-to-4 + "s-6" #'+workspace/switch-to-5 + "s-7" #'+workspace/switch-to-6 + "s-8" #'+workspace/switch-to-7 + "s-9" #'+workspace/switch-to-8 + "s-0" #'+workspace/switch-to-final))) (map! :leader @@ -330,6 +330,7 @@ :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 @@ -356,6 +357,7 @@ :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 @@ -381,6 +383,7 @@ :desc "Restart Emacs" "R" #'doom/restart) ) +;; some helpful general keys (map! "s-c" #'kill-ring-save "s-v" #'yank "s-x" #'kill-region @@ -395,7 +398,8 @@ "s-" #'beginning-of-buffer "s-" #'end-of-buffer "M-s-v" #'consult-yank-from-kill-ring - "s-" #'split-window-below) + "s-" #'split-window-below + "s-" #'+fold/toggle) (after! which-key (let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key)))) diff --git a/init.el b/init.el index cd95579..026c7fe 100644 --- a/init.el +++ b/init.el @@ -97,7 +97,7 @@ (eval +overlay) ; run code, run (also, repls) ;;gist ; interacting with github gists lookup ; navigate your code and its documentation - (lsp) ; M-x vscode + lsp ; M-x vscode magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds @@ -139,7 +139,7 @@ ;;gdscript ; the language you waited for ;;(go +lsp) ; the hipster dialect ;;(graphql +lsp) ; Give queries a REST - (haskell +tree-sitter) ; a language that's lazier than I am + (haskell +lsp +tree-sitter) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on (json +lsp +tree-sitter) ; At least it ain't XML