Closed gizmomogwai closed 1 year ago
sorry ... was my problem, wrong configuration. when configuring eglot properly (not on demand loading the serve-d) it works and produces e.g. nice flymake errors ...
a minimal config looks like this:
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(use-package d-mode
:straight t)
(use-package eglot
:straight t
:config (progn
(add-hook 'd-mode-hook 'eglot-ensure)))
; dont know how to put this in the previous :config block
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '((d-mode) "/serve-d/serve-d" "--logLevel=all")))
i am still trying to reproduce this in a docker container (having problems to find a prebuilt pretest emacs 29 version) to be 100% sure.
In the meantime I put up a dockerized emacs that shows emacs30-nightly + eglot + code-d working together. On some of my projects, code-d does not seems to be able to autodetect the required dub-configuration. What is the property to select the config?
btw. the dockerfile is located here: https://github.com/gizmomogwai/demacs If I find the time to polish eglot + code-d a little bit I will put up a asciinema of it.
Emacs staring with version 29, will finally feature a lsp client called eglot. I wanted to try, how the current serve-d behaves with that. Seems not to work at the moment. Steps I took (on os x with a M1 macbook, Ventura 13.4.1):
/Users/christian.koestlin/Sync/projects/_d/external/serve-d/serve-d --logLevel=all
this yields in the emacs logs:
and then in the details eglot logs (which include the stderr output of serve-d:
but whenever i try to do something with lsp e.g. find type definition i get: