Skip to content

Commit 4e9af55

Browse files
committed
start fix #370
1 parent 79b8218 commit 4e9af55

4 files changed

Lines changed: 116 additions & 0 deletions

File tree

package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,50 @@
11811181
"message": 5
11821182
}
11831183
}
1184+
],
1185+
"walkthroughs": [
1186+
{
1187+
"id": "code-d.welcome",
1188+
"title": "Get Started with D Development",
1189+
"description": "Setup your development experience for the D programming language.",
1190+
"steps": [
1191+
{
1192+
"id": "code-d.welcome.installCompiler",
1193+
"title": "Install and choose a D compiler (DMD, LDC or GCC)",
1194+
"description": "Run the 'Setup D Compiler' command to choose which D compiler to use with code-d and DUB. You can find available compilers on https://dlang.org/download.html",
1195+
"completionEvents": [
1196+
"onCommand:code-d.setupCompiler"
1197+
],
1198+
"media": {
1199+
"markdown": "res/walkthroughs/installCompiler.md"
1200+
}
1201+
},
1202+
{
1203+
"id": "code-d.welcome.userSettings",
1204+
"title": "Configure code-d",
1205+
"description": "Review some common user settings",
1206+
"media": {
1207+
"markdown": "res/walkthroughs/userSettings.md"
1208+
}
1209+
},
1210+
{
1211+
"id": "code-d.welcome.checkUserGuide",
1212+
"title": "Check out user guide",
1213+
"description": "The included code-d user guide contains tutorials and a description on all features of code-d. Make sure you read it!",
1214+
"completionEvents": [
1215+
"onCommand:code-d.viewUserGuide"
1216+
]
1217+
},
1218+
{
1219+
"id": "code-d.welcome.debugProject",
1220+
"title": "Run and Debug your first project",
1221+
"description": "Code-D includes debugging plugins to improve the D debugging experience. Get started with a project and debug it from code-d.",
1222+
"media": {
1223+
"markdown": "res/walkthroughs/debugProject.md"
1224+
}
1225+
}
1226+
]
1227+
}
11841228
]
11851229
},
11861230
"scripts": {

res/walkthroughs/debugProject.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Debugging Projects
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Installing a D Compiler
2+
3+
To run D code you first need to build it. To build it a compiler must be
4+
installed on the system.
5+
6+
There are several D compilers to choose from, you can find a list of them under
7+
https://dlang.org/download.html
8+
9+
## DMD
10+
11+
DMD is the official reference compiler for D. It always implements the latest
12+
features and the latest standard library + runtime. Additionally it is the
13+
fastest compiler out of the 3, although it doesn't produce the fastest
14+
executables. It's a good compiler for prototyping and quick scripts and is the
15+
recommended compiler to get if you don't know which one to get.
16+
17+
Download: https://dlang.org/download.html#dmd
18+
19+
## LDC
20+
21+
LDC is an LLVM-based (like clang) D compiler. It supports a variety of operating
22+
systems and target architectures and has very frequent releases, usually being
23+
up-to-date to the DMD reference compiler within days. It takes longer to compile
24+
executables but results in much better optimized executables than with DMD. LDC
25+
is a good compiler to be using in production to create executables.
26+
27+
Installation (package manager): https://github.com/ldc-developers/ldc#installation
28+
29+
Download (executables): https://github.com/ldc-developers/ldc/releases
30+
31+
## GDC
32+
33+
GDC is an GCC-based D compiler. Other than the other compilers it comes built-in
34+
into GCC and does not require a separate installation. It supports a variety of
35+
operating systems and target architectures. Being tied to GCC's release schedule
36+
it is often behind in new features but receives bug fix backports from later
37+
versions in minor updates. GDC could be called the most stable compiler as it is
38+
tied to specific D frontend versions for a while, only fixing issues without big
39+
changes. GDC is a good compiler to be using in production to create executables.
40+
41+
GDC is included in GCC since GCC 9.0, installing a recent GCC version should
42+
have it included by default.
43+
44+
For Linux distributions packaging the backends in different packages or Windows
45+
downloads see https://www.gdcproject.org/downloads
46+
47+
---
48+
49+
The installation packages of DMD and LDC come with various utilities (DUB, rdmd)
50+
installed. If you don't have these utilities because you used your Operating
51+
System's package manager or installed GDC, code-d will download the executables.

res/walkthroughs/userSettings.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Configuring Code-D
2+
3+
Code-D uses the standard VSCode user settings. Open the user settings and check
4+
out the section `Extensions > D` to view or edit all the settings.
5+
6+
In the JSON settings editor the settings all start with `"d."` for D related
7+
settings, `"dfmt."` for formatter related settings and `"dscanner."` for linting
8+
related settings.
9+
10+
Some features are disabled by default because they are not fully ready for all
11+
use-cases yet or may significantly increase resource usage on low-spec machines.
12+
If you want to, do give these features a try and report issues on
13+
[GitHub](https://github.com/Pure-D/code-d/issues).
14+
15+
Code-D is using a language server protocol called Serve-D to implement all of
16+
its features. Serve-D gets more frequent updates than Code-D and these will
17+
automatically be downloaded whenever a new stable release gets released. If you
18+
don't want to receive automatic updates or want to receive more frequent beta or
19+
nightly updates, configure the `d.servedReleaseChannel` user setting to your
20+
liking and reload the window.

0 commit comments

Comments
 (0)