diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/emacs/init.el | 30 | ||||
-rw-r--r-- | user/settings/emacs.nix | 3 |
2 files changed, 29 insertions, 4 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index 07d77b33..268a71d3 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -404,8 +404,7 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve :demand t :config (progn (setq evil-collection-magit-use-y-for-yank nil - evil-collection-corfu-key-themes '(tab-n-go - magic-return)) + evil-collection-corfu-key-themes '(default magic-return)) (general-unbind 'normal magit-mode-map "<escape>") (evil-collection-init))) @@ -527,7 +526,9 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (global-corfu-mode +1) (setq corfu-auto t corfu-auto-delay 0.1 - corfu-auto-prefix 3) + corfu-auto-prefix 3 + corfu-on-exact-match nil + corfu-preselect 'valid) (defun corfu-enable-in-minibuffer () "Enable Corfu in the minibuffer if `completion-at-point' is bound." (when (where-is-internal #'completion-at-point (list (current-local-map))) @@ -572,6 +573,15 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (add-hook 'kill-emacs-hook #'tabnine-kill-process))) +(use-package tempel + :bind (("M-+" . tempel-complete) ;; Alternative tempel-expand + ("M-*" . tempel-insert)) + :config (progn + (global-tempel-abbrev-mode +1))) + +(use-package tempel-collection + :after tempel) + ;;; Documentation (use-package eldoc @@ -1056,7 +1066,19 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (setq-default eglot-workspace-configuration '(:yaml (:keyOrdering nil) :nix (:autoArchive t)) - eglot-ignored-server-capabilities '(:documentHighlightProvider)))) + eglot-ignored-server-capabilities '(:documentHighlightProvider)) + (defun my/eglot-capf () + (setq-local completion-at-point-functions + (list (cape-capf-super + #'eglot-completion-at-point + #'tempel-expand + #'cape-file)))) + (add-hook 'eglot-managed-mode-hook #'my/eglot-capf))) + +(use-package eglot-tempel + :after eglot + :config (progn + (eglot-tempel-mode +1))) (use-package consult-eglot :commands (consult-eglot-symbols) diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index 465b132e..72125c95 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -145,6 +145,9 @@ in rainbow-delimiters stimmung-themes systemd + tempel + tempel-collection + eglot-tempel toml-mode treesit-grammars.with-all-grammars vc-msg |