summary refs log tree commit diff
path: root/emacs/custom/my-lsp.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-09-17 18:05:15 -0700
committerFranck Cuny <franck@fcuny.net>2022-09-17 19:36:58 -0700
commit87f4197f234ef838843f0df175d0c5834e58b76e (patch)
treeccad1db45f13fb493c175b11becee8d6f0d881a3 /emacs/custom/my-lsp.el
parentfeat(lang/nix): configure Emacs for nix (diff)
downloademacs.d-87f4197f234ef838843f0df175d0c5834e58b76e.tar.gz
ref(completion): add more packages for completion
Get LSP to work with cape and corfu for the completion.

Change-Id: Id8f01b1dee77957ff5ba27ed471707b7b9c7dc93
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-lsp.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/custom/my-lsp.el b/emacs/custom/my-lsp.el
index 0cb62bd..98c061a 100644
--- a/emacs/custom/my-lsp.el
+++ b/emacs/custom/my-lsp.el
@@ -22,6 +22,15 @@
 
 (add-hook 'lsp-mode-hook #'lsp-ui-mode)
 
+(require 'consult-lsp)
+(define-key lsp-mode-map [remap xref-find-apropos] #'consult-lsp-symbols)
+
+(require 'lsp-completion)
+(setq lsp-completion-provider :none)   ;; I use corfu
+(add-hook 'lsp-completion-mode-hook
+          (lambda ()
+	    (setf (alist-get 'lsp-capf completion-category-defaults) '((styles . (orderless flex))))))
+
 (provide 'my-lsp)
 
 ;;; my-lsp.el ends here