I'm using emacs-lsp with company-capf. While editing an elisp file, it works fine. However, once I run eval-buffer, I get the following error when trying to use completion:

Company: backend company-capf error "The connected server(s) does not support method textDocument/completion.
To find out what capabilities support your server use ‘M-x lsp-describe-session’

My emacs-lsp config is:

(use-package lsp-mode
  :hook ((c-mode          ; clangd
          c++-mode        ; clangd
          c-or-c++-mode   ; clangd
          python-mode     ; mspyls
          ) . lsp)
  :commands lsp
  (setq lsp-auto-guess-root t)
  (setq lsp-diagnostic-package :none)
  (setq lsp-enable-symbol-highlighting nil)
  (setq lsp-enable-on-type-formatting nil)
  (setq lsp-signature-auto-activate nil)
  (setq lsp-modeline-code-actions-enable nil)
  (setq lsp-modeline-diagnostics-enable nil)
  (setq lsp-enable-folding nil)
  (setq lsp-enable-imenu nil)
  (setq lsp-enable-snippet nil)
  (setq lsp-enable-completion-at-point nil)
  (setq read-process-output-max (* 1024 1024)) ;; 1mb
  (setq lsp-idle-delay 0.5)
  (setq lsp-prefer-capf t)
  • 1
    This is really an lsp-mode error. So if you don't get a good answer here, you can try their issue tracker.
    – Dmitry
    Dec 9, 2020 at 13:45
  • Any improvement in this question?
    – alper
    Jun 1, 2021 at 14:58
  • @alper I don't think SE is a good venue for bug reports.
    – Dmitry
    Jun 2, 2021 at 13:36
  • @Dmitry Sorry I wasn't sure it was related to a bug or a error on the user side
    – alper
    Jun 2, 2021 at 13:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.