adjust code completion settings

- switch away from using tab to trigger completion. i find it annoying
  when & how tab is "overloaded" with completion and indentation.
  using ctrl+space for completion feels a bit more normal to me anyway.
- turn on auto completion pop-up triggering
This commit is contained in:
Gered 2024-12-08 14:01:52 -05:00
parent 817a52b5cf
commit b53d7bcc85
2 changed files with 10 additions and 4 deletions

View file

@ -17,15 +17,19 @@
(setq-default tab-width 4)
(setq-default indent-tabs-mode t)
(setq-default tab-always-indent t)
(use-package corfu
:ensure t
:hook (after-init . global-corfu-mode)
:bind
( :map corfu-map
("<tab>" . corfu-complete))
;; :bind
;; ( :map corfu-map
;; ("<tab>" . corfu-complete))
:config
(setq tab-always-indent 'complete)
;;(setq tab-always-indent 'complete)
(setq corfu-auto t)
(setq corfu-auto-delay 0.5)
(setq corfu-auto-prefix 2)
(setq corfu-preview-current nil)
(setq corfu-min-width 20))

View file

@ -39,3 +39,5 @@
(global-set-key (kbd "M-<f10>") #'menu-bar-mode)
(global-set-key (kbd "C-x C-k") #'kill-this-buffer)
(global-set-key (kbd "C-SPC") #'completion-at-point)