Thread overview
The state of editor support for D is depressing, let's change that
4 days ago
xoxo
4 days ago
Serg Gini
4 days ago
xoxo
4 days ago
user1234
3 days ago
Lance Bachmeier
6 hours ago
Atila Neves
4 days ago

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

It’s insane how bad editor support is. Coming from Go, where the core team actually develops and maintains their own LSP and tools, it’s no wonder D never gained more traction.

And yes, I have tried ServeD, it's not reliable..

4 days ago

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

It’s insane how bad editor support is. Coming from Go, where the core team actually develops and maintains their own LSP and tools, it’s no wonder D never gained more traction.

And yes, I have tried ServeD, it's not reliable..

D has many features that hard to implement in LSP
templates, UFCS are just examples

You can check this implementation for example: https://github.com/rikkimax/dls

4 days ago

On Thursday, 28 August 2025 at 14:58:22 UTC, Serg Gini wrote:

>

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

It’s insane how bad editor support is. Coming from Go, where the core team actually develops and maintains their own LSP and tools, it’s no wonder D never gained more traction.

And yes, I have tried ServeD, it's not reliable..

D has many features that hard to implement in LSP
templates, UFCS are just examples

You can check this implementation for example: https://github.com/rikkimax/dls

Sorry I phrased my question poorly, I know how to implement a LSP server, I meant how to use DMD's parser as a library

From a HN thread:

>

WalterBright 54 days ago | root | parent | next [–]
The D lexer and parser can be used standalone.

4 days ago

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

It’s insane how bad editor support is. Coming from Go, where the core team actually develops and maintains their own LSP and tools, it’s no wonder D never gained more traction.

And yes, I have tried ServeD, it's not reliable..

auto a = b.this
           that
           f
           connect
           etc

It's indeed a way to discover a library.

3 days ago

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

I agree that the documentation for it is bad. I tested Github Copilot on it and it seemed to understand the code. Maybe that is a way to get started.

3 days ago

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

I want to use DMD as a library to start building a reliable LSP.

Problem is, there’s basically zero documentation on how to even get started with that.

Does anyone have pointers, examples, or any kind of reference that could help?

A presentation from dconf 2023: https://www.youtube.com/watch?v=eKT3MYpRgYA

Slides are linked from there. And Razvan works for DLF, he can probably help explain things if you ask here or other places.

>

It’s insane how bad editor support is. Coming from Go, where the core team actually develops and maintains their own LSP and tools, it’s no wonder D never gained more traction.

And yes, I have tried ServeD, it's not reliable..

I have seen this statement quite a bit. We need to work on it.

I think that a lot of D users (including myself) rely on very old-fashioned workflows for these kinds of things, so we don't feel that pain. Not saying this is an excuse, it just might explain why focus isn't high on this problem.

There is also work on a tree-sitter based LSP, which I believe is used in zed, see here: https://github.com/gdamore/tree-sitter-d

-Steve

6 hours ago

On Friday, 29 August 2025 at 02:10:59 UTC, Steven Schveighoffer wrote:

>

On Thursday, 28 August 2025 at 14:34:00 UTC, xoxo wrote:

>

[...]

A presentation from dconf 2023: https://www.youtube.com/watch?v=eKT3MYpRgYA

Slides are linked from there. And Razvan works for DLF, he can probably help explain things if you ask here or other places.

>

[...]

I have seen this statement quite a bit. We need to work on it.

I think that a lot of D users (including myself) rely on very old-fashioned workflows for these kinds of things, so we don't feel that pain. Not saying this is an excuse, it just might explain why focus isn't high on this problem.

There is also work on a tree-sitter based LSP, which I believe is used in zed, see here: https://github.com/gdamore/tree-sitter-d

-Steve

There's also DCD: https://github.com/dlang-community/DCD

It works well for me.