diff options
| author | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-04-30 04:12:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-30 04:12:10 -0400 |
| commit | 8039db3e2c6ca6cff995db982864a7b311f74047 (patch) | |
| tree | 695741b386caad202d69ba4fa81ddb26a64f9d96 | |
| parent | Merge `minor-ui-fixes` branch to `stable` branch (diff) | |
| parent | Use `orderless` completion suggestions (diff) | |
| download | mmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.tar.gz mmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.tar.bz2 mmosmacs-8039db3e2c6ca6cff995db982864a7b311f74047.zip | |
Merge `rfc/14/completion-corfu-vertico` branch to `stable` branch
| -rw-r--r-- | init.el | 83 |
1 files changed, 83 insertions, 0 deletions
| @@ -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. |