Open Visual Studio Code and install the code-d extension the normal way:
ext install webfreak.code-d
Or search for code-d and select the "D Programming Language (code-d)" extension from the list.
Manual (if the automatic way doesn't work)
# discouraged if you are trying out code-d, you should preferably install it from the marketplace
git clone https://github.com/Pure-D/code-d.git
# requires `npm install -g typescript` once
tsc -p .