- Locate the Visual Studio Code's installation directory (usually this is
C:\Users\<UserName>\AppData\Local\Code\app-<version>
where<UserName>
is the current Windows user name, and where<version>
is the version you want to modify [e.x.0.4.1
]) - Navigate to
<InstallPath>\resources\app\plugins
where<InstallPath>
is the path you located in step 1. - Create a new folder named
vs.language.d
and open it. - Inside of
vs.landuage.d
create a new folder namedsyntaxes
and open it. - Save or download the
d.json
file in this gist and place it inside thesyntaxes
folder. - Restart all instances of Visual Studio Code.
- Done.
That's all there is to it. After restarting VS Code, it should be able to automatically detect and highlght D source code.
- The JSON file included in this gist was translated from the SublimeText language definition plist at alexrp.st2-d using plist-to-json.
- The source plist the JSON file was translated from does have some highlighting issues, and those issues have been carried over to the JSON version.
Using the dark theme; showing unstable quicksort example