]> git.eshelyaron.com Git - emacs.git/commitdiff
Use of company-capf backend in eglot-managed buffers
authorJoão Távora <joaotavora@gmail.com>
Wed, 16 Oct 2019 15:29:41 +0000 (16:29 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 16 Oct 2019 15:29:41 +0000 (16:29 +0100)
* eglot.el (company-backends): forward-declare
(eglot--managed-mode): Force company-backends to company-capf

lisp/progmodes/eglot.el

index 9460e4b3c64b29528d619896108175eaf2b9af0f..0220969e6fd4daa5e44ce4dadc7ad3ba4a0d1569 100644 (file)
@@ -71,6 +71,8 @@
 (require 'filenotify)
 (require 'ert)
 (require 'array)
+(defvar company-backends) ; forward-declare, but don't require company yet
+
 
 \f
 ;;; User tweakable stuff
@@ -1196,6 +1198,7 @@ and just return it.  PROMPT shouldn't end with a question mark."
     (eglot--setq-saving eldoc-documentation-function #'eglot-eldoc-function)
     (eglot--setq-saving xref-prompt-for-identifier nil)
     (eglot--setq-saving flymake-diagnostic-functions '(eglot-flymake-backend t))
+    (eglot--setq-saving company-backends '(company-capf))
     (add-function :around (local 'imenu-create-index-function) #'eglot-imenu)
     (flymake-mode 1)
     (eldoc-mode 1))