Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 797 Bytes

editor-emacs.md

File metadata and controls

26 lines (18 loc) · 797 Bytes

serve-d with Emacs

Using eglot

Download or build

And edit your $HOME/.emacs or $HOME/.emacs.d/init.el.

(add-hook 'd-mode-hook 'eglot-ensure)
(add-to-list 'eglot-server-programs `(d-mode . ("/path/to/your/serve-d")))

OPTIONAL: If you want to customize serve-d (e.g. specifying paths), add

(setq-default eglot-workspace-configuration
  '((:d . (:stdlibPath ("/path/to/dmd-2.098.0/src/phobos"
                        "/path/to/dmd-2.098.0/src/druntime/src")))))

For per-project config, add .dir-locals.el in your project root.