summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el80
1 files changed, 70 insertions, 10 deletions
diff --git a/init.el b/init.el index 6879eab..f1f3b3e 100644 --- a/init.el +++ b/init.el
@@ -149,7 +149,7 @@
149(setup completion 149(setup completion
150 (:option completion-ignore-case t 150 (:option completion-ignore-case t
151 read-buffer-completion-ignore-case t 151 read-buffer-completion-ignore-case t
152 completion-styles '(partial-completion substring flex) 152 completion-styles '(substring partial-completion)
153 completion-category-defaults nil 153 completion-category-defaults nil
154 completion-category-overrides 154 completion-category-overrides
155 '((file (styles . (partial-completion))))) 155 '((file (styles . (partial-completion)))))
@@ -564,8 +564,12 @@ like a dumbass."
564 '(read-only t cursor-intangible t face minibuffer-prompt) 564 '(read-only t cursor-intangible t face minibuffer-prompt)
565 enable-recursive-minibuffers t 565 enable-recursive-minibuffers t
566 file-name-shadow-properties '(invisible t intangible t) 566 file-name-shadow-properties '(invisible t intangible t)
567 read-answer-short t) 567 read-answer-short t
568 read-extended-command-predicate ; used on >28
569 #'command-completion-default-include-p)
568 570
571 (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
572
569 (add-hook 'minibuffer-setup-hook #'acdw/gc-disable) 573 (add-hook 'minibuffer-setup-hook #'acdw/gc-disable)
570 (add-hook 'minibuffer-exit-hook #'acdw/gc-enable) 574 (add-hook 'minibuffer-exit-hook #'acdw/gc-enable)
571 575
@@ -929,9 +933,24 @@ if ripgrep is installed, otherwise `consult-grep'."
929 933
930 ;; Competion-at-point (complete-region) 934 ;; Competion-at-point (complete-region)
931 (:global "M-/" completion-at-point) 935 (:global "M-/" completion-at-point)
932 (:option completion-in-region-function #'consult-completion-in-region 936 (:option completion-in-region-function
937 (lambda (&rest args)
938 (apply (if vertico-mode
939 #'consult-completion-in-region
940 #'completion--in-region)
941 args))
933 completion-cycle-threshold 3 942 completion-cycle-threshold 3
934 tab-always-indent 'complete)) 943 tab-always-indent 'complete)
944
945 ;; Completing-read-multple
946 (if (fboundp #'consult-completing-read-multiple)
947 (:advise completing-read-multple
948 :override #'consult-completing-read-multiple)
949
950 (defun crm-indicator (args)
951 (cons (concat "[CRM] " (car args)) (cdr args)))
952 (:advise completing-read-multiple
953 :filter-args #'crm-indicator)))
935 954
936(setup (:straight crux) 955(setup (:straight crux)
937 956
@@ -984,6 +1003,30 @@ if ripgrep is installed, otherwise `consult-grep'."
984 :branch "main")) 1003 :branch "main"))
985 (require 'gemini-write)))) 1004 (require 'gemini-write))))
986 1005
1006(setup (:straight embark)
1007 (:global "C-." embark-act
1008 "C-;" embark-dwim)
1009 (:option prefix-help-command #'embark-prefix-help-command
1010 (append display-buffer-alist)
1011 '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
1012 nil
1013 (window-parameters (mode-line-format . none)))
1014 embark-prompter #'embark-keymap-prompter
1015 embark-verbose-indicator-display-action
1016 '(display-buffer-at-bottom (window-height . fit-window-to-buffer)))
1017
1018 (setq embark-action-indicator
1019 (lambda (map _target)
1020 (which-key--show-keymap "Embark" map nil nil 'no-paging)
1021 #'which-key--hide-popup-ignore-command)
1022 embark-become-indicator embark-action-indicator)
1023
1024 (with-eval-after-load 'embark
1025 (with-eval-after-load 'consult
1026 (setup (:straight embark-consult)
1027 (add-hook 'embark-collect-mode-hook
1028 #'consult-preview-at-point-mode)))))
1029
987(setup (:straight epithet) 1030(setup (:straight epithet)
988 (add-hook 'Info-selection-hook #'epithet-rename-buffer) 1031 (add-hook 'Info-selection-hook #'epithet-rename-buffer)
989 (add-hook 'eww-after-render-hook #'epithet-rename-buffer) 1032 (add-hook 'eww-after-render-hook #'epithet-rename-buffer)
@@ -1062,9 +1105,6 @@ if ripgrep is installed, otherwise `consult-grep'."
1062 "<help> o" helpful-symbol 1105 "<help> o" helpful-symbol
1063 "C-c C-d" helpful-at-point)) 1106 "C-c C-d" helpful-at-point))
1064 1107
1065(setup (:straight imenu-anywhere)
1066 (:global "C-." imenu-anywhere))
1067
1068(setup (:straight iscroll) 1108(setup (:straight iscroll)
1069 (:hook-into text-mode)) 1109 (:hook-into text-mode))
1070 1110
@@ -1141,7 +1181,7 @@ if ripgrep is installed, otherwise `consult-grep'."
1141 :host github 1181 :host github
1142 :repo "oantolin/orderless")) 1182 :repo "oantolin/orderless"))
1143 (require 'orderless) 1183 (require 'orderless)
1144 (:option (prepend completion-styles) 'orderless)) 1184 (:option (append completion-styles) 'orderless))
1145 1185
1146(setup (:straight org) 1186(setup (:straight org)
1147 (:straight org-contrib) 1187 (:straight org-contrib)
@@ -1164,7 +1204,9 @@ if ripgrep is installed, otherwise `consult-grep'."
1164 org-hide-emphasis-markers t 1204 org-hide-emphasis-markers t
1165 org-html-coding-system 'utf-8-unix 1205 org-html-coding-system 'utf-8-unix
1166 org-imenu-depth 3 1206 org-imenu-depth 3
1207 org-outline-path-complete-in-steps nil
1167 org-pretty-entities t 1208 org-pretty-entities t
1209 org-refile-use-outline-path 'file
1168 org-special-ctrl-a/e t 1210 org-special-ctrl-a/e t
1169 org-special-ctrl-k t 1211 org-special-ctrl-k t
1170 org-src-fontify-natively t 1212 org-src-fontify-natively t
@@ -1297,13 +1339,31 @@ if ripgrep is installed, otherwise `consult-grep'."
1297 1339
1298(setup (:straight (vertico 1340(setup (:straight (vertico
1299 :host github 1341 :host github
1300 :repo "minad/vertico")) 1342 :repo "minad/vertico"
1343 :files ("*" "extensions/*"
1344 (:exclude ".git"))))
1345
1301 (:option resize-mini-windows 'grow-only 1346 (:option resize-mini-windows 'grow-only
1302 vertico-count-format nil 1347 vertico-count-format nil
1303 vertico-cycle t) 1348 vertico-cycle t)
1349
1304 (if (boundp 'comp-deferred-compilation-deny-list) 1350 (if (boundp 'comp-deferred-compilation-deny-list)
1305 (add-to-list 'comp-deferred-compilation-deny-list "vertico")) 1351 (add-to-list 'comp-deferred-compilation-deny-list "vertico"))
1306 (vertico-mode +1)) 1352
1353 (vertico-mode +1)
1354
1355 ;; Extensions!
1356 (:also-load vertico-mouse)
1357 (vertico-mouse-mode +1)
1358
1359 ;; Workarounds!
1360 (when (version< org-version "9.5")
1361 (defun disable-selection ()
1362 (when (eq minibuffer-completion-table #'org-tags-completion-function)
1363 (setq-local vertico-map minibuffer-local-completion-map
1364 completion-cycle-threshold nil
1365 completion-styles '(basic))))
1366 (advice-add #'vertico--setup :before #'disable-selection)))
1307 1367
1308(setup (:straight vuiet) 1368(setup (:straight vuiet)
1309 (:needs "youtube-dl" 1369 (:needs "youtube-dl"