From 664742a1f235379587962279b9fa0dceb7c88728 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Sun, 18 May 2025 13:01:05 +0100 Subject: Moved all binding to use-package bind --- config/editor.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'config/editor.el') diff --git a/config/editor.el b/config/editor.el index 4029b6e..e7b65e1 100644 --- a/config/editor.el +++ b/config/editor.el @@ -59,6 +59,14 @@ (use-package smartparens :ensure t + :defer nil + :bind + (:map smartparens-mode-map + ("C-" . sp-forward-slurp-sexp) + ("C-" . sp-forward-barf-sexp) + ("C-M-" . sp-backward-slurp-sexp) + ("C-M-" . sp-backward-barf-sexp)) + :config (require 'smartparens-config) (smartparens-global-mode t) @@ -66,18 +74,13 @@ (setq sp-base-key-bindings 'paredit) (setq sp-autoskip-closing-pair 'always) (setq sp-hybrid-kill-entire-symbol nil) - (setq blink-matching-paren nil) - - (define-key smartparens-mode-map (kbd "C-") 'sp-forward-slurp-sexp) - (define-key smartparens-mode-map (kbd "C-") 'sp-forward-barf-sexp) - (define-key smartparens-mode-map (kbd "C-M-") 'sp-backward-slurp-sexp) - (define-key smartparens-mode-map (kbd "C-M-") 'sp-backward-barf-sexp)) + (setq blink-matching-paren nil)) (use-package easy-kill :ensure t - :config - (global-set-key [remap kill-ring-save] 'easy-kill) - (global-set-key [remap mark-sexp] 'easy-mark)) + :bind + (([remap kill-ring-save] . easy-kill) + ([remap mark-sexp] . easy-mark))) (use-package whitespace-cleanup-mode :ensure t @@ -104,11 +107,11 @@ (use-package crux :ensure t - :config - (global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line) - (global-set-key (kbd "C-c o") #'crux-open-with) - (global-set-key (kbd "C-") 'crux-kill-line-backwards) - (global-set-key [remap kill-whole-line] 'crux-kill-whole-line)) + :bind + (([remap move-beginning-of-line] . crux-move-beginning-of-line) + ("C-c o" . crux-open-with) + ("C-" . crux-kill-line-backwards) + ([remap kill-whole-line] . crux-kill-whole-line))) ;; nfkjbndfkb kdjbnkfjb (use-package flyspell -- cgit v1.2.3