commit 4c7f43c5cfd27a70ab013e98bc26e97a68398137
parent aeac1194bcf34b0cac462477c244f5a3e706db2a
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sun, 18 Oct 2026 23:43:21 +0200
emacs: switch from company to corfu
Diffstat:
1 file changed, 30 insertions(+), 27 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org
@@ -1415,11 +1415,6 @@ Embark: perform actions on things
(use-package embark-consult)
#+end_src
-** company: completion mechanism
-#+begin_src emacs-lisp
- (use-package company)
-#+end_src
-
** wgrep: writable grep
#+begin_src emacs-lisp
(use-package wgrep)
@@ -3234,22 +3229,8 @@ In Python, I want to enable flycheck and semantic mode:
:ensure nil ; preinstalled
:hook ((emacs-lisp-mode . flycheck-mode)
(emacs-lisp-mode . rainbow-mode)
- (emacs-lisp-mode . outline-minor-mode)
- (emacs-lisp-mode . company-mode)))
-#+end_src
-** lean-mode
-Specifically for the Lean prover.
-I also install company-lean and helm-lean, which are suggested on the [[https://github.com/leanprover/lean-mode][Github page]].
-Then I map company-complete only for lean-mode.
-
-#+begin_src emacs-lisp
- (use-package lean-mode
- :config
- (use-package company-lean)
- :bind (:map lean-mode-map
- ("S-SPC" . company-complete)))
+ (emacs-lisp-mode . outline-minor-mode)))
#+end_src
-
** sh-mode
#+begin_src emacs-lisp :results value
(use-package sh-script
@@ -3363,7 +3344,6 @@ Like virtualenvwrapper.sh, but for Emacs.
#+begin_src emacs-lisp
(use-package ledger-mode
:mode ("\\.ledger\\'")
- :hook (ledger-mode . company-mode)
:custom
(ledger-clear-whole-transactions t)
(ledger-reconcile-default-commodity "eur")
@@ -3631,12 +3611,6 @@ Also, counsel doesn't provide some keybindings that I can get from helpful.
#+begin_src emacs-lisp
(use-package markdown-mode)
#+end_src
-** vdirel (contacts)
-#+begin_src emacs-lisp
- (use-package vdirel
- :config
- (vdirel-switch-repository "~/.local/share/contacts/default"))
-#+end_src
** Yaml
#+begin_src emacs-lisp
(use-package yaml-mode
@@ -3647,6 +3621,35 @@ Also, counsel doesn't provide some keybindings that I can get from helpful.
(setq-local outline-regexp (rx (* blank)))
(outline-minor-mode))))
#+end_src
+** emacs
+#+begin_src emacs-lisp
+ (use-package corfu
+ :init
+ ;; Recommended: Enable Corfu globally. Recommended since many modes provide
+ ;; Capfs and Dabbrev can be used globally (M-/). See also the customization
+ ;; variable `global-corfu-modes' to exclude certain modes.
+ (global-corfu-mode))
+
+ ;; A few more useful configurations...
+ (use-package emacs
+ :ensure nil
+ :custom
+ ;; TAB cycle if there are only few candidates
+ ;; (completion-cycle-threshold 3)
+
+ ;; Enable indentation+completion using the TAB key.
+ ;; `completion-at-point' is often bound to M-TAB.
+ (tab-always-indent 'complete)
+
+ ;; Emacs 30 and newer: Disable Ispell completion function.
+ ;; Try `cape-dict' as an alternative.
+ (text-mode-ispell-word-completion nil)
+
+ ;; Hide commands in M-x which do not apply to the current mode. Corfu
+ ;; commands are hidden, since they are not used via M-x. This setting is
+ ;; useful beyond Corfu.
+ (read-extended-command-predicate #'command-completion-default-include-p))
+#+end_src
** calc
#+begin_src emacs-lisp
(use-package calc