aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-04-30 04:12:10 -0400
committerGitHub <noreply@github.com>2023-04-30 04:12:10 -0400
commit8039db3e2c6ca6cff995db982864a7b311f74047 (patch)
tree695741b386caad202d69ba4fa81ddb26a64f9d96 /init.el
parentMerge `minor-ui-fixes` branch to `stable` branch (diff)
parentUse `orderless` completion suggestions (diff)
downloadmmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.tar.gz
mmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.tar.bz2
mmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.zip
Merge `rfc/14/completion-corfu-vertico` branch to `stable` branch
Diffstat (limited to 'init.el')
-rw-r--r--init.el83
1 files changed, 83 insertions, 0 deletions
diff --git a/init.el b/init.el
index f37ad3a..3ec63f9 100644
--- a/init.el
+++ b/init.el
@@ -104,6 +104,89 @@
104 104
105 105
106;; --------------------------------------------------------------------- 106;; ---------------------------------------------------------------------
107;;; Completion
108;; -----------
109;; Completion refers to the suggestions you get when you type a few
110;; characters in almost any modern IDE. MMOSMacs attempts to have
111;; completion in as many places as possible.
112;; ---------------------------------------------------------------------
113
114;; ---------------------------------
115;; Minibuffer completion
116;; ---------------------
117;; Vertico provides minibuffer when
118;; typing commands and stuff like
119;; that.
120;; ---------------------------------
121
122(use-package vertico
123 :straight t
124 :config
125 (setq vertico-count 5
126 vertico-cycle nil)
127 (vertico-mode))
128
129
130;; ---------------------------------
131;; Text completion
132;; ---------------
133;; Corfu provides in-buffer text
134;; completion, and is the
135;; counterpart to vertico.
136;; ---------------------------------
137
138(use-package corfu
139 :straight (corfu :files (:defaults "extensions/*")
140 :includes (corfu-info corfu-history))
141 :config
142 (setq corfu-auto t
143 corfu-auto-prefix 2
144 corfu-auto-delay 0.1
145 corfu-min-width 40
146 corfu-max-width corfu-min-width
147 corfu-count 8
148 corfu-scroll-margin 3
149 corfu-cycle nil
150 corfu-popupinfo-delay 0.15
151 corfu-quit-at-boundary t
152 corfu-separator ?\s
153 corfu-quit-no-match 'separator)
154 :init
155 (global-corfu-mode)
156 (corfu-popupinfo-mode)
157 (corfu-indexed-mode))
158
159
160;; ---------------------------------
161;; Minibuffer hints
162;; ----------------
163;; Add descriptions and keybind
164;; hints to minibuffer completions.
165;; ---------------------------------
166
167(use-package marginalia
168 :straight t
169 :init (marginalia-mode))
170
171
172;; ---------------------------------
173;; Orderless completion
174;; --------------------
175;; A different ordering method for
176;; completion suggestions
177;; ---------------------------------
178
179(use-package orderless
180 :straight t
181 :config
182 (setq completion-styles '(orderless basic)
183 completion-category-defaults nil
184 completion-category-overrides '((file (styles partial-completion)))))
185
186
187
188
189;; ---------------------------------------------------------------------
107;;; Text Editor 190;;; Text Editor
108;; ------------ 191;; ------------
109;; These tweaks are meant to make the text editor more convenient. 192;; These tweaks are meant to make the text editor more convenient.