Fix corfu preview with eglot mode

This commit is contained in:
Jeremy Dormitzer 2023-09-26 10:38:05 -04:00
parent c716174511
commit 7e0b08ad16

View File

@ -46,6 +46,11 @@
(use-package eglot
:commands (eglot)
:config
(defun my-eglot-managed-hook ()
(if (eglot-managed-p)
(setq-local corfu-preview-current nil)
(kill-local-variable 'corfu-preview-current)))
(add-hook 'eglot-managed-mode-hook #'my-eglot-managed-hook)
(add-to-list 'eglot-server-programs
'(js-web-mode . ("typescript-language-server" "--stdio")))
(add-to-list 'eglot-server-programs