Jump to page: 1 2
Thread overview
The state of editor support for D is depressing, let's change that
Aug 28
xoxo
Aug 28
Serg Gini
Aug 28
xoxo
Aug 28
user1234
2 days ago
Salih Dincer
1 day ago
monkyyy
22 hours ago
Kapendev
August 28

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..

August 28

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

August 28

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.

August 28

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.

August 29

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.

August 29

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

September 01

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.

3 days ago

On Thursday, 28 August 2025 at 16:07:40 UTC, xoxo wrote:

>

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.

I was maintaining a D Language Server up until some 4-5 years ago, and one of the last things I had tried out before abandoning it was using DMD as a library. It seemed promising at first, but it felt like DMD had definitely not been thought for use as a library back then. Maybe there has been an effort to make it so in the last couple years?

The state of editor support in D has always been a bit depressing; but it's nice to see some people still trying to improve it!

2 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..

In modern software development practices, strong and reliable editor support (such as code completion, error detection, and refactoring through IDEs or editors) plays a critical role. While languages like Go have built a strong ecosystem thanks to LSP tools developed directly by their language teams, D still lags behind in this area.

SDB@79

1 day ago

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

>

my wish list for an editor:

  1. typewriter mode
  2. color coding off keyword(what syntax highlighter can understand my code?)
  3. random dark theme setting
  4. memes noises and animations https://www.youtube.com/watch?v=teJjJh2s7Po
« First   ‹ Prev
1 2