
Ask HN: D programmers, what does your development setup look like? - abhijat
For D programming, I was wondering what sort of setup do people have in terms of code editor, plugins for editor and build system?<p>Do you have features like autocomplete and refactoring in your environment?<p>I recently started exploring D and I use VSCode and the code-d plugin with dub or simply dmd -run for small files, but was wondering what more seasoned developers use.
======
giancarlostoro
I use VS Code or Sublime Text 3 (just syntax highlighting and command line
compilation) but wish there was either a D based official editor (a la
DrRacket for Racket or IDLE for Python, which are simple but good enough) and
that somebody at JetBrains would adopt and maintain one of the Dlang plugins.
I would even be okay with Walter Bright (or anyone in the D community) taking
one of his Emacs implementations in D and giving it a GUI with menu options
for people who don't know Emacs keybindings and letting the community take
over, an officially supported editor would be healthy.

I almost exclusively code with JetBrains IDEs for almost every other language,
especially Go. The way GoLand feels handcrafted for Go is phenomenal for me.

I've also used Spacemacs for D but Emacs is always hit or miss for me to setup
Spacemacs so I gave up on Emacs, too much overhead, if I have to go beyond the
install steps given by Spacemacs to make it work, it's not worth my time
period.

~~~
jefftime
I had a similar experience with Spacemacs. I currently use regular Emacs with
some packages (evil-mode) and find it much easier to deal with and configure
than Spacemacs. Emacs does take some additional configuration after install in
order to get it how you want it, so you still might dislike it, but I thought
I'd throw in my two cents

~~~
giancarlostoro
I have not tried anything else because I just use Emacs as is, I never really
liked VIM till recently and even now I rarely use it unless I'm working
directly on a remote system (bash scripts for legacy systems).

My biggest appeal for Emacs is TRAMPS, where I am able to edit files after
setting up Emacs once.

I forgot to add this on my post which I linked to in a reply to someone else's
comment but here's a list of editors and what they support for D:

[https://wiki.dlang.org/Editors](https://wiki.dlang.org/Editors)

------
WebFreak001
For multiple years I have been using dub as build system and vscode with
code-d as editor.

Well I'm a bit biased because I made code-d but nonetheless I would say it
works really good for day-to-day usage for any experience level and I'm
recommending it to everyone I show D for the first time too because it is very
friendly for beginners and people who don't want to configure a lot.

~~~
skocznymroczny
The beginner friendly is important. I use code-d because it provides a better
out of the box experience, providing dub build and run tasks. In DLS I either
only get the building task or have to set them up myself.

------
tfcat
DLangIDE* (somehow not listed on dlang's official editor list) is sincerely
the best I've used in terms of IDEs, but for most work, there's not much that
can beat plain Sublime 3.

* [https://github.com/buggins/dlangide](https://github.com/buggins/dlangide)

~~~
abhijat
Thanks for mentioning this, I hadn't seen it mentioned anywhere before in my
(admittedly shallow) research.

------
brianush1
I use VSCode with Laurent Tréguier's Dlang extension[0], which provides
support for autocomplete, linting, and formatting code, and dub for building,
testing, and managing packages.

The reason for choosing the Dlang plugin over code-d is pretty petty; it's
just because I prefer Dlang's syntax highlighting, since it highlights class
names in a teal color.

[0]:
[https://marketplace.visualstudio.com/items?itemName=LaurentT...](https://marketplace.visualstudio.com/items?itemName=LaurentTreguier.vscode-
dls)

~~~
abaga129
Vscode is my preferred editor as well. I recently switched to Dlang from
code-d. To me Dlang has felt more stable. I frequently switch back and forth
across multiple OSs and computers so the most reliable is what I will go with.
I also like that DLang uses D language server rather that relying on dfmt dcd
and scanner separately.

I still like code-d and would recommend anyone to try both before deciding for
yourself. I used code-d for about 3 years.

------
hr0m
I use VS Codium. That is the opensource packaging without Microsofts calling
home functionality: [https://vscodium.com](https://vscodium.com), with the Vim
and code-d extension.

You also will want to change some shortcuts, so for example you can switch to
terminal and back with CTRL+~, in order to run/test your app quickly.

I would also like to have a full fledged IDE like i have for Python with
pycharm, but currently nothing is available.

------
DmitryOlshansky
I used plain Sublime, but switched to VSCode with code-d plugin / dcd
completion daemon.

Usually works decently unless you tinker with std library / runtime where you
are mostly on your own.

~~~
giancarlostoro
I gotta admit, VS Code is probably the most complete setup I've seen:

[https://wiki.dlang.org/Editors](https://wiki.dlang.org/Editors)

See the wiki page for reference of features supported by different editors.
The other neat thing about VS Code for people who love vim: with Neovim you
can use the full blown power of VIM as the backend for editing in VS Code
whilst using the plugins from VS Code and Neovim.

~~~
vips7L
Is there a specific extension to use neovim with vscode?

~~~
giancarlostoro
It's still experimental but the VS Code Vim extension has support for Neovim:

[https://github.com/VSCodeVim/Vim#neovim-
integration](https://github.com/VSCodeVim/Vim#neovim-integration)

I personally have not gone full dive on it yet though. I think once I can use
Neovim on every major IDE / Editor, I might go fully into Neovim just for
consistency in editing.

~~~
vips7L
Ah ok! I didnt know they added support for that. I know sublime has a plugin
that uses it.

------
skocznymroczny
I use the code-d plugin with VSCode. Yes, I have autocomplete. I haven't
really seen any refactoring options, and I think D isn't a very refactoring
friendly language in general, because a lot of the code doesn't exist until
compilation time.

For building I use dub. For debugging I use built-in C++ Native support in
VSCode.

------
Cogitri
I use VSCode with the excellent Code-D for my IDE needs and use both dub
(mainly for development) and meson (for distros) as build systems for my
projects. Dub is nice for development since it supports stuff like unittest
coverage out of the box, but meson is kind of a requirement when you want to
ship your stuff to distros, has better support for customisation and can do
lots of fancy stuff (e.g. configure files)

------
chromatin
I use VSCode with webfreak's code-d extension[0] on both macOS and linux.
Overall am very pleased with this. My dream would be for some JetBrains
integration into CLion.

[0]
[https://marketplace.visualstudio.com/items?itemName=webfreak...](https://marketplace.visualstudio.com/items?itemName=webfreak.code-d)

~~~
bachmeier
FYI, some[1] have reported using the D Language plugin[2] with CLion.

[1]
[https://forum.dlang.org/post/mailman.344.1577092366.31109.di...](https://forum.dlang.org/post/mailman.344.1577092366.31109.digitalmars-
d-learn@puremagic.com) [2]
[https://plugins.jetbrains.com/plugin/8115-d-language/](https://plugins.jetbrains.com/plugin/8115-d-language/)

~~~
abaga129
Yeah they added expiremental support for CLion in v1.17 but it still has a
long way to go. [https://github.com/intellij-dlanguage/intellij-
dlanguage/blo...](https://github.com/intellij-dlanguage/intellij-
dlanguage/blob/develop/README.md)

I would love to see CLion support get better since we could use the debugger.

------
bachmeier
A text editor with a Makefile and gdb have always worked just fine for me. And
that is in fact one of the things that appealed to me when I started using D.
These days VSCode and CLion seem to be the tools of choice, so maybe I should
give them a try.

------
zmix
The Language Server Protocol (LSP) runs not only on VSCode, btw., but
recently, SublimeText3 got support for it via an addon.

------
p0nce
I use Visual Studio and the VisualD extension.

------
grawprog
I use dlangide with dub for building.

------
GrumpyNl
PhPstorm, JIra, bitbucket and xxamp

