emacs: More autocomplete tweaks

This commit is contained in:
Charlotte Van Petegem 2023-08-02 17:04:52 +02:00
parent ab9d778dc8
commit 6353cb8cc5
No known key found for this signature in database
GPG key ID: 019E764B7184435A
3 changed files with 12 additions and 6 deletions

View file

@ -24,8 +24,6 @@
:global-prefix "C-SPC"
)
;; Overwrite evil's evil-complete-next
(imap "C-n" 'completion-at-point)
(nmap "<escape>" '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

View file

@ -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))))

View file

@ -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)
)
''
];