diff --git a/config/completion.org b/config/completion.org index 4e75731..a7ddf4e 100644 --- a/config/completion.org +++ b/config/completion.org @@ -36,7 +36,9 @@ :custom (completion-styles '(orderless basic)) (completion-category-defaults nil) - (completion-category-overrides '((file (styles . (partial-completion)))))) + (completion-category-overrides '((file (styles . (partial-completion))) + (eglot (styles . (styles orderless))) + (eglot-capf (styles . (styles orderless)))))) #+end_src * Corfu and Cape diff --git a/config/ide.org b/config/ide.org index f960bcd..2bf3465 100644 --- a/config/ide.org +++ b/config/ide.org @@ -70,7 +70,7 @@ Set treesit to fontify all elements, default was 3 (out of 4) f90-mode js-ts-mode) . eglot-ensure) - (eglot-managed-mode . (lambda () (add-to-list 'flymake-diagnostic-functions #'eglot-flymake-backend)))) + (eglot-managed-mode . (lambda () (add-to-list 'flymake-diagnostic-functions #'eglot-flymake-backend t)))) :custom (eglot-extend-to-xref t) (eglot-autoshutdown t) @@ -94,7 +94,16 @@ Set treesit to fontify all elements, default was 3 (out of 4) :flake ( :autoArchive t :autoEvalInputs t - :nixpkgsInputName "nixpkgs")))))) + :nixpkgsInputName "nixpkgs"))))) + (with-eval-after-load 'cape + (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) + (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))) #+end_src * Apheleia formatting