dmd-lsp: a D language server built with dmd as a library
xoxorwr
xororwr at gmail.com
Thu Sep 17 08:52:39 UTC 2026
Hello,
As many of you know, the state of D tooling, specially editor
tooling, is pretty poor.
There are a few existing LSPs, and while they are very helpful,
they don't support many of D features and have to approximate
what the compiler is actually doing.
So, I decided to tackle this problem, and try to use DMD itself
as the backend for an LSP.
After a few weeks of work (and the help of a LLM), I'm happy to
say I got it working!
The LSP supports every D features (it's dmd after all).
It supports most modern platforms (linux, macOS intel & arm*,
windows*) and there is also a vscode extension available.
It doesn't support dub yet, so you'll have to maintain a json
file where you put your import paths, check the readme for
configuration!
There is still plenty to polish, but the core is there now and
it's working exceptionally well.
Give it a try:
https://github.com/xoxorwr/dmd-lsp
Don't hesitate to contribute to the project, I'm looking
specially for windows users who can help review the worker code.
Thanks to the D foundation for the "DMD as a library" initiative,
it really paid off!


* I don't have a windows machine, it should work, but I haven't
tested myself, CI is green, please test and report back!
* I don't have a mac either, but it should work just fine.
* This was built with the help of a LLM.
More information about the Digitalmars-d-announce
mailing list