Setting up D development environment on a Mac with Xamarin Studio

We will see how to setup Xamarin Studio do provide syntax highlighting, autocompletion etc., for D programming on Mac OSX

Created: by Pradeep Gowda Updated: Nov 25, 2023 Tagged: dlang · macosx

Basic installation

Install D language stuff:

brew install dmd
brew install dub

Install Xamarin Studio – http://xamarin.com/download

Install Mono-D for Xamarin Studio to get auto completion, build etc.,. If you are familiar with eclipse’s way of adding features via plugins, this will be very familiar.

Download essential D sources

I strongly recommend that you checkout the following libraries and add their paths in the “includes” tab. See “Setup Mono-D, step 4” of Mono-D document.

git clone git@github.com:D-Programming-Language/dmd.git
git clone git@github.com:D-Programming-Language/druntime.git
git clone git@github.com:D-Programming-Language/phobos.git

Set D compiler toolchain

Xamarin Studio / Preferences / D / Compiler toolchains

Set D includes

Xamarin Studio / Preferences / D / Compiler toolchains / includes (tab)

Set dub option

Xamarin Studio / Preferences / D / Dub Options

Additional tools

  • dfmt is a formatter for D source code, similar to gofmt.

References

See also: Using Sublime Text 3 for D programming