diff --git a/modules/base/emacs/base-init.el b/modules/base/emacs/base-init.el index 126d0ab0..ccbe88de 100644 --- a/modules/base/emacs/base-init.el +++ b/modules/base/emacs/base-init.el @@ -24,8 +24,6 @@ :global-prefix "C-SPC" ) - ;; Overwrite evil's evil-complete-next - (imap "C-n" 'completion-at-point) (nmap "" 'save-buffer) (lmap "" nil ;; Unbind SPC, I don't use it for navigation anyway. @@ -112,7 +110,7 @@ (defun chvp--setup-capfs () (add-hook 'completion-at-point-functions #'tempel-complete -50 t) (add-hook 'completion-at-point-functions #'cape-file 10 t) - (add-hook 'completion-at-point-functions #'dabbrev-capf 15 t) + (add-hook 'completion-at-point-functions #'cape-dabbrev 15 t) (add-hook 'completion-at-point-functions #'cape-line 20 t) ) ) @@ -124,10 +122,16 @@ (corfu-cycle t "Enable cycling through completions") (corfu-auto t "Show completion preview by default") (corfu-auto-prefix 2 "Show completion after two characters") + (corfu-quit-no-match t "Quit completion without match, even if separator has been entered") :config (global-corfu-mode) ) +(use-package corfu-popupinfo + :ensure nil ;; Part of corfu + :config (corfu-popupinfo-mode) + ) + ;; Prescient in corfu (use-package corfu-prescient :after (corfu prescient) @@ -225,7 +229,7 @@ :after (vertico) :custom (completion-styles '(orderless basic) "Use orderless for filtering") - (orderless-matching-styles '(orderless-regexp orderless-initialism orderless-prefixes) "More matching styles for more flexible matching.") + (orderless-matching-styles '(orderless-initialism orderless-prefixes orderless-flex) "More matching styles for more flexible matching.") ) ;; Org diff --git a/modules/base/emacs/snippets/fundamental.eld b/modules/base/emacs/snippets/fundamental.eld index c868dc48..7a58d11f 100644 --- a/modules/base/emacs/snippets/fundamental.eld +++ b/modules/base/emacs/snippets/fundamental.eld @@ -2,5 +2,5 @@ fundamental-mode (today (format-time-string "%Y-%m-%d")) (NOW (format-time-string "<%Y-%0m-%0d %a %H:%0M>")) -(yesterday (format-time-string "<%Y-%0m-%0d %a>" (time-subtract nil (* 24 60 60)))) -(tomorrow (format-time-string "<%Y-%0m-%0d %a>" (time-add nil (* 24 60 60)))) +(yesterday (format-time-string "%Y-%0m-%0d" (time-subtract nil (* 24 60 60)))) +(tomorrow (format-time-string "%Y-%0m-%0d" (time-add nil (* 24 60 60)))) diff --git a/modules/programs/hledger/default.nix b/modules/programs/hledger/default.nix index c37062e1..51c96a60 100644 --- a/modules/programs/hledger/default.nix +++ b/modules/programs/hledger/default.nix @@ -20,6 +20,8 @@ (ledger-post-amount-alignment-at :decimal "Align on the decimal") (ledger-post-amount-alignment-column 69 "Align on column 70") (ledger-post-auto-align t "Align when moving to the next line") + :config + (advice-add 'ledger-complete-at-point :around #'cape-wrap-nonexclusive) ) '' ];