From ad20935123b42801f3815e2d694d2741ff06a2a9 Mon Sep 17 00:00:00 2001 From: Vladislav Slobodenyuk Date: Thu, 23 Jan 2025 10:39:23 +0900 Subject: [PATCH] Add compile bindings, fix rust-mode-hook. --- .config.d/05-basic.el | 13 +++++++++---- .config.d/15-lsp.el | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.config.d/05-basic.el b/.config.d/05-basic.el index 0cdc245..97be153 100644 --- a/.config.d/05-basic.el +++ b/.config.d/05-basic.el @@ -98,9 +98,14 @@ ;; Windmove family of commands allow easy navigation when there is more than two ;; buffers on screen. -(global-set-key (kbd "C-S-") 'windmove-left) -(global-set-key (kbd "C-S-") 'windmove-right) -(global-set-key (kbd "C-S-") 'windmove-up) -(global-set-key (kbd "C-S-") 'windmove-down) +(keymap-global-set "C-S-" 'windmove-left) +(keymap-global-set "C-S-" 'windmove-right) +(keymap-global-set "C-S-" 'windmove-up) +(keymap-global-set "C-S-" 'windmove-down) + +;; Compile command allows to easily run noninteractive commands, among other +;; things, like, you know, compiling stuff. +(keymap-global-set "C-c l" 'compile) +(keymap-global-set "C-c C-l" 'recompile) ;;; 05-basic.el ends here diff --git a/.config.d/15-lsp.el b/.config.d/15-lsp.el index 5bd5de9..bc5efb7 100644 --- a/.config.d/15-lsp.el +++ b/.config.d/15-lsp.el @@ -50,7 +50,7 @@ (setq sweeprolog-swipl-path "swipl") (add-to-list 'auto-mode-alist '("\\.plt?\\'" . sweeprolog-mode))) -(add-hook 'rust-mode-hook #'eglot) +(add-hook 'rust-mode-hook #'eglot-ensure) ;; Nix language (use-package nix-mode