D support for GNOME Builder

Laurent Tréguier laurent.treguier.sink at gmail.com
Fri Jan 11 10:10:20 UTC 2019


On Friday, 11 January 2019 at 06:08:17 UTC, Neia Neutuladh wrote:
> I was only vaguely aware that GNOME Builder existed and decided 
> to check it out. It's a bit rough around the edges, and it 
> succumbs to the unfortunate modern GNOME habit of having tiny 
> inscrutable icons instead of a menu bar. But I kind of like it, 
> at least in theory, so I decided to have a look.
>
> GNOME Builder supports the Language Server Protocol. Or rather, 
> the nightly builds support it. The nightly builds also depend 
> on bleeding edge GNOME libraries, which means flatpak (kind of 
> bleh). Plugins seem to be written in Python (which is 
> convenient because I'm not particularly able to crack open a 
> flatpak to compile a C or Vala plugin inside).

GNOME Builder's stable version supports the LSP too, not just the 
nightly builds. I have GNOME 3.30 on Fedora, and Builder supports 
both Rust and Go using it.

> From that point, it was a matter of copying and modifying the 
> Go LSP plugin.
>
> This leaves a few issues:
> * The completion window is five characters wide. Even if DCD 
> integration
> were working as expected and DCD were producing the best 
> results ever,
> this would be useless.

I don't have this problem, the completion window on my system is 
as wide as the widest completion available. Sounds like a pretty 
annoying bug though.

> * Braces and indentation are pretty poorly handled. They're 
> handled right
> in C, so it's just a matter of telling GNOME Builder to treat D 
> like C in
> this way.
> * Either DCD is giving poor results, or GNOME Builder isn't 
> properly
> querying it, and I can't tell which.
> * It's flatpak, so it doesn't integrate well with the rest of 
> the system.
> Most importantly, dcd-server (the version I'm using, at least) 
> doesn't
> automatically discover dmd.conf, and it might take some work to 
> find it.
> That might not even work if dmd is installed in an unexpected 
> location in
> the filesystem.

That should be fixable by having some plugin settings to handle 
it. If a Builder plugin were to use either DLS or Serve-d, I 
reckon adding Builder settings corresponding to the language 
server's settings would be something to do anyway, and both have 
a setting for this.

> * The documentation required to get even this far is abysmal, 
> where it
> even exists.

Challenge accepted


More information about the Digitalmars-d mailing list