Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 50 forks source link

Attempt at using serve-d via eglot in Emacs #355

Open nordlow opened 10 months ago

nordlow commented 10 months ago

The following code fails for me

(defun d-serve-d-command ()
  "Shell command to start serve-d."
  "serve-d")

(use-package eglot                      ;`eglot.el' now part of Emacs
  :ensure t
  :hook (d-mode . eglot-ensure)
  :hook (d-ts-mode . eglot-ensure)
  ;; TODO: update binary of serve-d if needed
  :config
  (add-to-list 'eglot-server-programs ;https://forum.dlang.org/post/s6cpls$pg3$1@digitalmars.com
                 `((d-mode d-ts-mode) ,(d-serve-d-command))))

as

eglot--error: [eglot] Unsupported or ignored LSP capability `:declarationProvider'

when trying out

M-x eglot-find-declaration

.

M-x eglot-list-connections

lists

serve-d          SIL              d-ts-mode, d-mode

. What am I missing here?

Do I need to tell eglot to use another LSP capability when looking up symbol definitions?