On Wednesday, 28 April 2021 at 23:04:27 UTC, Christian Köstlin wrote:
if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo.
Its a little tricky, because the basic setup works e.g. with emacs 27.2 or newer, but not with 27.1. All that is needed (if you have the right emacs version and use straight for installing packages) is:

I'm having problems with serve-d + eglot in Emacs. All calls to


answers as

eglot--error: [eglot] Sorry, this server doesn't do :textDocument/declaration

Are neither of


supported? If so what lsp request type should I use to lookup/navigate to definitions? Without such functionality I see no use of eglot.

. I'm currently using

(use-package eglot
  ;; :straight t
  :ensure t
  :defer t
  :hook (d-mode . eglot-ensure)
    ;; (add-hook 'd-mode-hook 'eglot-ensure)
        (let ((cmd '("dub" "run" "--vquiet" "serve-d")))
(add-to-list 'eglot-server-programs ;https://forum.dlang.org/post/s6cpls$pg3$1...@digitalmars.com
                   `(d-mode . ,cmd))
(add-to-list 'eglot-server-programs ;https://forum.dlang.org/post/s6cpls$pg3$1...@digitalmars.com
                   `(d-ts-mode . ,cmd))))
  ;; (remove-hook 'd-mode-hook 'eglot-ensure)

. Has anybody gotten these things to work?

Reply via email to