From: Eshel Yaron Date: Mon, 17 Apr 2023 19:30:35 +0000 (+0300) Subject: Update Emacs configuration X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce148887168a82e3935fa14e1613c50009df2a6b;p=dotfiles.git Update Emacs configuration --- diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5115a62..f7c88c9 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -29,8 +29,9 @@ (setq gc-cons-threshold init-gc-cons-threshold mode-line-format nil) (add-hook 'after-init-hook - (lambda () (setq gc-cons-threshold normal-gc-cons-threshold - mode-line-format normal-mode-line-format))))) + (lambda () + (setq gc-cons-threshold normal-gc-cons-threshold + mode-line-format normal-mode-line-format))))) (esy/init-step vars "Set some variables." @@ -103,7 +104,6 @@ ob-prolog orderless org - org-modern org-transclusion package-lint paredit @@ -344,7 +344,7 @@ completions-detailed nil completion-styles '(orderless partial-completion basic) completion-show-help nil - completions-header-format nil + ;; completions-header-format nil completion-auto-help 'visual completions-max-height 16 completion-auto-wrap t @@ -573,6 +573,17 @@ (keymap-set search-map "l" #'rg-literal) (keymap-set search-map "b" #'some-button) + (keymap-set window-prefix-map "p" #'windmove-swap-states-up) + (keymap-set window-prefix-map "n" #'windmove-swap-states-down) + (keymap-set window-prefix-map "a" #'windmove-swap-states-left) + (keymap-set window-prefix-map "e" #'windmove-swap-states-right) + + (dolist (command '(windmove-swap-states-up + windmove-swap-states-down + windmove-swap-states-left + windmove-swap-states-right)) + (put command 'repeat-map 'window-prefix-map)) + ;; unbind some keys (dolist (key '("s-a" "s-d" "s-e" "s-f" "s-g" "s-h" "s-j" "s-k" "s-l" "s-m" "s-o" "s-p" "s-q" "s-s" "s-t" "s-u" "s-w" "s-x" @@ -701,7 +712,8 @@ as the initial input for completion, and return that directory." "Configure Org mode." (with-eval-after-load 'org (keymap-unset org-mode-map "C-," t) - (add-to-list 'org-src-lang-modes '("prolog" . sweeprolog))) + (add-to-list 'org-src-lang-modes '(("SWI-prolog" . sweeprolog) + ("bash" . sh)))) (with-eval-after-load 'org-agenda (add-to-list 'org-agenda-custom-commands @@ -769,15 +781,15 @@ as the initial input for completion, and return that directory." (list string pred action)))) (keymap-set minibuffer-local-completion-map - " " + "C-p" #'minibuffer-previous-completion) (keymap-set minibuffer-local-completion-map - " " + "C-n" #'minibuffer-next-completion) (keymap-set minibuffer-local-completion-map - " " + "M-j" #'minibuffer-force-complete-and-exit) @@ -947,6 +959,7 @@ as the initial input for completion, and return that directory." "Associate major modes with files based on their extensions." (dolist (cell '(("Dockerfile" . dockerfile-ts-mode) ("\\.ya?ml\\'" . yaml-ts-mode) + ("\\.toml\\'" . toml-ts-mode) ("\\.json\\'" . json-ts-mode) ("\\.tfstate\\'" . json-ts-mode) ("\\.ts\\'" . typescript-ts-mode)