www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - serve-d and emacs

reply =?UTF-8?Q?Christian_K=c3=b6stlin?= <christian.koestlin gmail.com> writes:
Does anybody use serve-d with emacs (lsp-mode or eglot)?
I would love to see the configuration!

Kind regards,
Christian
Apr 26
parent reply WebFreak001 <d.forum webfreak.org> writes:
On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin wrote:
 Does anybody use serve-d with emacs (lsp-mode or eglot)?
 I would love to see the configuration!

 Kind regards,
 Christian
if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo. Basic setup should be quite easy, see vim for reference: https://github.com/Pure-D/serve-d/blob/master/editor-vim.md
Apr 26
next sibling parent =?UTF-8?Q?Christian_K=c3=b6stlin?= <christian.koestlin gmail.com> writes:
On 26.04.21 21:13, WebFreak001 wrote:
 On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin wrote:
 Does anybody use serve-d with emacs (lsp-mode or eglot)?
 I would love to see the configuration!

 Kind regards,
 Christian
if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo. Basic setup should be quite easy, see vim for reference: https://github.com/Pure-D/serve-d/blob/master/editor-vim.md
I finally got it working for me. 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: (use-package d-mode :straight t) (use-package eglot :straight t :init (progn (add-hook 'd-mode-hook 'eglot-ensure) )) (add-to-list 'eglot-server-programs '(d-mode . ("PATH_TO_SERVE_D/serve-d"))) With a plain emacs installation the following should work: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (package-refresh-contents) (package-install 'project) (package-install 'd-mode) (package-install 'eglot) (require 'project) (require 'd-mode) (require 'eglot) (add-to-list 'eglot-server-programs '(d-mode . ("FULL_PATH_TO_SERVE_D"))) (add-hook 'd-mode-hook 'eglot-ensure) (One emacs restart might be necessary, as there is a conflict of version for the dependency "project". Kind regards, Christian
Apr 28
prev sibling parent reply =?UTF-8?Q?Christian_K=c3=b6stlin?= <christian.koestlin gmail.com> writes:
On 26.04.21 21:13, WebFreak001 wrote:
 On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin wrote:
 Does anybody use serve-d with emacs (lsp-mode or eglot)?
 I would love to see the configuration!

 Kind regards,
 Christian
if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo. Basic setup should be quite easy, see vim for reference: https://github.com/Pure-D/serve-d/blob/master/editor-vim.md
I threw together a "minimal" emacs configuration that can be used if you have just a plain emacs and dlang installation. See https://github.com/gizmomogwai/demacs Kind regards, Christian
Apr 30
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 30 April 2021 at 21:24:35 UTC, Christian Köstlin wrote:
 On 26.04.21 21:13, WebFreak001 wrote:
 On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin 
 wrote:
 Does anybody use serve-d with emacs (lsp-mode or eglot)?
 I would love to see the configuration!

 Kind regards,
 Christian
if you configure it yourself, feel free to share the configuration and maybe PR it to serve-d repo. Basic setup should be quite easy, see vim for reference: https://github.com/Pure-D/serve-d/blob/master/editor-vim.md
I threw together a "minimal" emacs configuration that can be used if you have just a plain emacs and dlang installation. See https://github.com/gizmomogwai/demacs Kind regards, Christian
👍
May 01