`);
53 | }
54 | else
55 | {
56 | lintLinks(line, name, lineNo);
57 | output.rawWrite(line);
58 | }
59 | }
60 | }
61 | }
62 |
63 | void lintLinks(const(char)[] line, const(char)[] src, int lineNo)
64 | {
65 | ptrdiff_t last;
66 | while (true)
67 | {
68 | auto i = line.indexOf(')', last);
69 | if (i == -1)
70 | break;
71 | auto start = line.lastIndexOf('(', i);
72 | if (start <= 0)
73 | break;
74 | auto content = line[start + 1 .. i];
75 |
76 | if (!content.startsWith("http:", "https:", "data:", "command:", "/") && line[start - 1] == ']')
77 | {
78 | auto hash = content.indexOf('#');
79 | if (hash != -1)
80 | content = content[0 .. hash];
81 |
82 | if (content.length && !exists(content) && !exists(chainPath("..", "docs", content)))
83 | {
84 | stderr.writeln("Warning: dead link in ", src, ":", lineNo, ": ", content);
85 | }
86 | }
87 |
88 | last = i + 1;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/docs-src/dub.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | #menu
4 |
5 | ## DUB Package Manager
6 |
7 | code-d offers full integration for the DUB package manager for all development purposes. This includes:
8 |
9 | - Full file support for dub.json and dub.sdl
10 | - Dependency management within VSCode
11 | - Add/Remove/Upgrade dependencies
12 | - Go to definition, auto complete, etc.
13 | - Building
14 | - Creation
15 |
16 | ### "DUB Dependencies" Panel
17 |
18 | The first entry point to the dub dependencies is the "DUB Dependencies" panel in the files list:
19 |
20 | 
21 |
22 | Using the first button dependencies can automatically be added to the dub package file in the project.
23 |
24 | 
25 |
26 | Adding a dependency will automatically add it to the dub package file.
27 |
28 | To remove or update a dependency, right click it and select the desired option.
29 |
30 | When first adding a dependency it will be missing any version from the list:
31 |
32 | 
33 |
34 | This also means that auto completion and other features for this dependency won't work. To fix this, open the command line and enter
35 |
36 | ```
37 | dub upgrade
38 | ```
39 |
40 | to make dub download all dependencies.
41 |
42 | When done, press the reload button at the right to refresh the local dependencies. (subject to change)
43 |
44 | 
45 |
46 | Any dependency in this tree can be expanded and collapsed. Additionally it is possible to click on the dependencies to view the locally installed README files:
47 |
48 | 
49 |
50 | It will also show much of the other information which can be put into the dub package files. This panel gives a quick and easy overview over the complexity of all dependencies and access to so. Viewing the README files makes it easy to view example code given by the language authors.
51 |
52 | ### Editing
53 |
54 | 
55 |
56 | Here code-d adds 2 buttons at the top of the bar for easier manipulation:
57 |
58 | The left-most button "Convert between dub.json/dub.sdl" will rename and convert the file to the other available format by dub.
59 |
60 | 
61 |
62 | Be aware that this will remove all comments from a dub.sdl and unknown directives from a dub.json file and reset all indentation.
63 |
64 | The middle button "Open project settings" opens a (currently disfunctional) GUI editor for the dub.json file. Note this functionality is only currently implemented for dub.json and not dub.sdl
65 |
66 | Auto completion and inline hover documentation in this file will usually guide you through everything you need to know. Refer to the [official documentation](https://dub.pm/package-format-json) for details.
67 |
68 | 
69 |
70 | ### Building
71 |
72 | See [building](building.md)
73 |
74 | ### Next Steps
75 |
76 | Create a [web server with vibe.d](vibe-d.md)
77 |
--------------------------------------------------------------------------------
/docs-src/hello-world.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | #menu
4 |
5 | ## Hello World
6 |
7 | ### Opening a Workspace
8 |
9 | code-d works best when folders are opened.
10 |
11 | For a simple project open a normal folder using the `Open Folder...` button.
12 |
13 | It's possible to add multiple folders to the workspace in VSCode using `File -> Add Folder to Workspace...`.
14 |
15 | Click `File -> Open Folder...` or `Ctrl-Shift-P -> Open Folder...` to open an empty folder as workspace for your project.
16 |
17 | 
18 |
19 | ### Working without workspace
20 |
21 | It is also possible to have projects with very few files and no dependencies whatsoever. For this you can also open a workspace as described above to have full feature access (such as build tasks and dependencies) but for quickly editing singular D files it is also possible to simply open them in VSCode. However auto completion is limited to only the standard library in this case, so it's not a good idea to work like this for bigger projects.
22 |
23 | ### Generating a Project using a Template
24 |
25 | code-d contains project templates to quick-start the creation of projects.
26 |
27 | Open an empty folder with the desired name for the project.
28 |
29 | Continue by opening the command palette (F1 or Ctrl-Shift-P) and run `code-d: Create new project`. Follow the wizard to create the project.
30 |
31 | 
32 |
33 | ### Writing code
34 |
35 | You can now start coding away. To make this hello world project actually work, insert the following code:
36 |
37 | ```d
38 | import std.stdio;
39 |
40 | void main()
41 | {
42 | writeln("Hello World");
43 | }
44 | ```
45 |
46 | ### Things to note
47 |
48 | The example projects create a DUB project for you. (Noticable with the dub.json or dub.sdl file which is present at root level)
49 |
50 | This means you have access to the whole [D package registry](https://code.dlang.org) and can use DUB as build tool too.
51 |
52 | See [DUB homepage](https://dub.pm) for more information.
53 |
54 | ### Next Steps
55 |
56 | Next you might want to check out the chapter [Building](building.md) to see how you can now run your application.
57 |
58 | However if you don't want to use DUB for building and dependencies, check out [how to configure non-DUB projects](non-dub.md)
59 |
60 | You might also want to explore the [Editor Features](editing.md) code-d has to offer.
61 |
--------------------------------------------------------------------------------
/docs-src/include/menu.md:
--------------------------------------------------------------------------------
1 | * [Home](index.md)
2 |
3 | * [Installation](install.md)
4 |
5 | * [Tutorial](intro-to-d.md)
6 |
7 | * [Intro to D](intro-to-d.md)
8 |
9 | * [Hello World](hello-world.md)
10 |
11 | * [Building](building.md)
12 |
13 | * [Debugging](debugging.md)
14 |
15 | * [Editing](editing.md)
16 |
17 | * [DUB Package Manager](dub.md)
18 |
19 | * [vibe.d Web App](vibe-d.md)
20 |
21 | * [Configuring non-DUB projects](non-dub.md)
22 |
23 | * [Troubleshooting](troubleshooting.md)
24 |
25 | * [Changelog](../CHANGELOG.md)
26 |
--------------------------------------------------------------------------------
/docs-src/include/sponsor.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Join the Chat
4 |
Donate
5 |
6 |
7 |
8 |
9 | [](https://discord.gg/Bstj9bx)
10 |
11 | Discord chat
12 |
13 |
14 | Development
15 |
16 | & Support
17 |
18 |
19 |
20 |
21 | [](https://github.com/sponsors/WebFreak001)
22 |
23 | Donate for faster
24 |
25 | development on
26 |
27 | code-d and serve-d
28 |
29 |
2 |
3 | Welcome! Thank you for installing code-d.
4 |
5 | This document describes how you can effectively use code-d and D in Visual Studio Code from the ground up.
6 |
7 | **To open this at any later point, run `Ctrl-Shift-P -> code-d: Open User Guide / Documentation`**
8 |
9 | #include sponsor.md
10 |
11 | Click a link below to open pages about certain topics.
12 |
13 | #include menu.md
14 |
15 | ---
16 |
17 | **GitHub**:
18 |
19 | **Plugin**: https://github.com/Pure-D/code-d
20 |
21 | **Language Features**: https://github.com/Pure-D/serve-d
22 |
--------------------------------------------------------------------------------
/docs-src/install.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | #menu
4 |
5 | First you have to install code-d in VSCode like any other extension from the side panel in VSCode.
6 |
7 | It's possible to manually download the vsix for manual installation from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=webfreak.code-d) or the [Open VSX Registry](https://open-vsx.org/extension/webfreak/code-d).
8 |
9 | ## First time installing D
10 |
11 | If you don't have D installed, code-d will open the [D compiler download page](https://dlang.org/download.html) for you where you simply select your compiler of choice and install it for your OS.
12 |
13 | On Windows it's a good idea to restart your PC after D is installed so it is accessible from PATH from within VSCode and its extensions.
14 |
15 | After D has been installed, restart VSCode and open a D project, everything should work now.
16 |
17 | ## Verifying functionality
18 |
19 | First open a folder with a D project or a blank one to create a project in. With a folder opened, simply open any D file and then in the bottom panels, check the **Output** tab.
20 |
21 | 
22 |
23 | In here at the right you should see a drop-down menu. If you can see `code-d & serve-d` in this then it means the extension is working and running.
24 |
25 | 
26 |
27 | If you experience any issues, check this tab for possible errors and log for debugging purposes when submitting an issue.
28 |
29 | For more information in case something doesn't work, refer to [Troubleshooting](troubleshooting.md).
30 |
31 | ## First steps
32 |
33 | [Tutorial](intro-to-d.md)
34 |
--------------------------------------------------------------------------------
/docs-src/intro-to-d.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | #menu
4 |
5 | ## Intro to D
6 |
7 | D is a general-purpose programming language with static typing, systems-level access, and C-like syntax.
8 |
9 | There are great resources online to learn D. Check out the following selection for high quality beginner-friendly D tutorials:
10 |
11 | - [Language Reference](https://dlang.org/spec/spec.html) (official reference)
12 |
13 | Exhaustive list of all grammatical constructs in the language in easy to read language. Great for people with some previous experience in programming.
14 |
15 | Must-read at some point when programming in D.
16 |
17 | - [DLang Tour](https://tour.dlang.org/) (community-maintained)
18 |
19 | Multi language, extensive tutorial page covering a lot of basics for people with some previous experience in programming. Covers multiple topics and standard library and is a great place to check out.
20 |
21 | - [Programming in D](http://ddili.org/ders/d.en/)
22 |
23 | Great book about D. Available in English or Turkish and as Paper Book, e-Book and online website. Although having experience in other programming languages is certainly helpful, this book starts from the basics.
24 |
25 | ## Community Support
26 |
27 | - [D Forum Learn Group](https://forum.dlang.org/group/learn)
28 |
29 | Great place to ask complex questions and get the most feedback. Available online or as mailing list.
30 |
31 | - [StackOverflow](https://stackoverflow.com/)
32 |
33 | Use the `d` tag for D questions, perfect to ask general questions when there isn't anything online.
34 |
35 | - [D Language Code Club (discord)](https://discord.gg/Bstj9bx)
36 |
37 | Official Discord chat of the code-d extension. Active and fast community support for most of the day and also support for code-d issues. More links for D resources here too.
38 |
39 | ## Next Steps
40 |
41 | Start writing a [Hello World](hello-world.md) project.
42 |
--------------------------------------------------------------------------------
/docs-src/non-dub.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | #menu
4 |
5 | ## Configuring non-DUB projects
6 |
7 | By default code-d loads the project folder itself and then each dub project in child folders as separate root.
8 |
9 | Without dub by default it will only load the project folder itself as root but it's possible to specify multiple roots in one folder for multiple projects in one folder. For this, specify `d.extraRoots` in your workspace settings with relative paths to each folder that is supposed to be treated as separate project.
10 |
11 | In each root code-d checks if one of the following folders exist if there is no dub and the `d.projectImportPaths` user setting is not set:
12 | - `source/`
13 | - `src/`
14 |
15 | The first one off that list is going to be picked as source directory for that root. If none of those exist, the folder itself is going to be used as directory for sources. By specifying `d.projectImportPaths` it is possible to override this behavior to use a custom defined source folder path. All paths in `d.projectImportPaths` are relative to the project folder and all roots will have the same import paths with this.
16 |
17 | 
18 |
19 | You can see that imports from local files are auto-completed with no problems. However when trying to use files from external folders (such as here, the `ext/` folder) the auto completion will not find these symbols.
20 |
21 | To fix this, change `d.projectImportPaths` to `[".", "ext"]` in your workspace settings:
22 |
23 | ```json
24 | {
25 | "d.projectImportPaths": [".", "ext"]
26 | }
27 | ```
28 |
29 | 
30 |
31 | By setting this all external dependencies specified will now load properly:
32 |
33 | 
34 |
35 | ### Building
36 |
37 | If you have a very simple script without any extra dependencies outside the source folder itself, you can run each file using RDMD:
38 |
39 | 
40 |
41 | However this will not work in this case with extra custom dependencies if they are used as it will not pick them up for the imports.
42 |
43 | Otherwise you will have to define your own scripts or build tools and best integrate them in the [build task definitions](https://go.microsoft.com/fwlink/?LinkId=733558) so you can use them for [debugging](debugging.md).
44 |
--------------------------------------------------------------------------------
/docs-src/vibe-d.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | #menu
4 |
5 | ## vibe.d Web App
6 |
7 | ### Generating the Project
8 |
9 | Much like in the [Hello World example](hello-world.md) you first need to use the project generator to create a project. This time select `Basic Web Server` for a basic vibe.d web servers.
10 |
11 | 
12 |
13 | You will find that several template files have been inserted in your project folder:
14 |
15 | 
16 |
17 | In general:
18 |
19 | * `public/` contains all the HTTP-accessible static files such as images, stylesheets and scripts.
20 | * `source/` contains all the server-side D code
21 | * `views/` contains all the server-side templates for rendering into HTML
22 |
23 | ### Running the Web App
24 |
25 | Simply hit `Ctrl-Shift-B` to use the build tasks as described in the [Building](building.md) chapter and use the run option or simply enter `dub run` in the integrated terminal.
26 |
27 | 
28 |
29 | The first time this will take a while to fetch and compile all dependencies, but successive runs will be faster.
30 |
31 | When now running the application, a web server will be opened which you can access locally:
32 |
33 | 
34 |
35 | You can now open [http://127.0.0.1:3000/](http://127.0.0.1:3000/) in your browser to look at the example vibe.d app.
36 |
37 | 
38 |
39 | You can explore around in the source code and do modifications. Once done, close the server using `Ctrl-C` in the terminal and rebuild and start it again.
40 |
41 | ### Diet Template Files
42 |
43 | vibe.d uses a template format called [Diet](https://vibed.org/templates/diet) which is based off [pugjs](https://pugjs.org/api/getting-started.html). It is an indentation based language emitting HTML or XML code which can contain D code which is compiled in and run at runtime.
44 |
45 | See documentation: [diet reference](https://vibed.org/templates/diet)
46 |
47 | ```dt
48 | doctype html
49 | html
50 | head
51 | title My Website
52 | link(rel="stylesheet", href="/css/style.css")
53 | body
54 | h1 Hello World!
55 | p Edit
56 | code views/index.dt
57 | | to edit this template
58 | a(href="/api/users") Example REST API
59 | ```
60 |
61 | code-d provides full auto completion support for HTML5 tags and attributes. Additionally it fully supports auto completing inline D code inside diet template files.
62 |
63 |
--------------------------------------------------------------------------------
/docs/dub.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tutorial
4 |
5 |
22 |
23 | ## DUB Package Manager
24 |
25 | code-d offers full integration for the DUB package manager for all development purposes. This includes:
26 |
27 | - Full file support for dub.json and dub.sdl
28 | - Dependency management within VSCode
29 | - Add/Remove/Upgrade dependencies
30 | - Go to definition, auto complete, etc.
31 | - Building
32 | - Creation
33 |
34 | ### "DUB Dependencies" Panel
35 |
36 | The first entry point to the dub dependencies is the "DUB Dependencies" panel in the files list:
37 |
38 | 
39 |
40 | Using the first button dependencies can automatically be added to the dub package file in the project.
41 |
42 | 
43 |
44 | Adding a dependency will automatically add it to the dub package file.
45 |
46 | To remove or update a dependency, right click it and select the desired option.
47 |
48 | When first adding a dependency it will be missing any version from the list:
49 |
50 | 
51 |
52 | This also means that auto completion and other features for this dependency won't work. To fix this, open the command line and enter
53 |
54 | ```
55 | dub upgrade
56 | ```
57 |
58 | to make dub download all dependencies.
59 |
60 | When done, press the reload button at the right to refresh the local dependencies. (subject to change)
61 |
62 | 
63 |
64 | Any dependency in this tree can be expanded and collapsed. Additionally it is possible to click on the dependencies to view the locally installed README files:
65 |
66 | 
67 |
68 | It will also show much of the other information which can be put into the dub package files. This panel gives a quick and easy overview over the complexity of all dependencies and access to so. Viewing the README files makes it easy to view example code given by the language authors.
69 |
70 | ### Editing
71 |
72 | 
73 |
74 | Here code-d adds 2 buttons at the top of the bar for easier manipulation:
75 |
76 | The left-most button "Convert between dub.json/dub.sdl" will rename and convert the file to the other available format by dub.
77 |
78 | 
79 |
80 | Be aware that this will remove all comments from a dub.sdl and unknown directives from a dub.json file and reset all indentation.
81 |
82 | The middle button "Open project settings" opens a (currently disfunctional) GUI editor for the dub.json file. Note this functionality is only currently implemented for dub.json and not dub.sdl
83 |
84 | Auto completion and inline hover documentation in this file will usually guide you through everything you need to know. Refer to the [official documentation](https://dub.pm/package-format-json) for details.
85 |
86 | 
87 |
88 | ### Building
89 |
90 | See [building](building.md)
91 |
92 | ### Next Steps
93 |
94 | Create a [web server with vibe.d](vibe-d.md)
95 |
--------------------------------------------------------------------------------
/docs/hello-world.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tutorial
4 |
5 |
22 |
23 | ## Hello World
24 |
25 | ### Opening a Workspace
26 |
27 | code-d works best when folders are opened.
28 |
29 | For a simple project open a normal folder using the `Open Folder...` button.
30 |
31 | It's possible to add multiple folders to the workspace in VSCode using `File -> Add Folder to Workspace...`.
32 |
33 | Click `File -> Open Folder...` or `Ctrl-Shift-P -> Open Folder...` to open an empty folder as workspace for your project.
34 |
35 | 
36 |
37 | ### Working without workspace
38 |
39 | It is also possible to have projects with very few files and no dependencies whatsoever. For this you can also open a workspace as described above to have full feature access (such as build tasks and dependencies) but for quickly editing singular D files it is also possible to simply open them in VSCode. However auto completion is limited to only the standard library in this case, so it's not a good idea to work like this for bigger projects.
40 |
41 | ### Generating a Project using a Template
42 |
43 | code-d contains project templates to quick-start the creation of projects.
44 |
45 | Open an empty folder with the desired name for the project.
46 |
47 | Continue by opening the command palette (F1 or Ctrl-Shift-P) and run `code-d: Create new project`. Follow the wizard to create the project.
48 |
49 | 
50 |
51 | ### Writing code
52 |
53 | You can now start coding away. To make this hello world project actually work, insert the following code:
54 |
55 | ```d
56 | import std.stdio;
57 |
58 | void main()
59 | {
60 | writeln("Hello World");
61 | }
62 | ```
63 |
64 | ### Things to note
65 |
66 | The example projects create a DUB project for you. (Noticable with the dub.json or dub.sdl file which is present at root level)
67 |
68 | This means you have access to the whole [D package registry](https://code.dlang.org) and can use DUB as build tool too.
69 |
70 | See [DUB homepage](https://dub.pm) for more information.
71 |
72 | ### Next Steps
73 |
74 | Next you might want to check out the chapter [Building](building.md) to see how you can now run your application.
75 |
76 | However if you don't want to use DUB for building and dependencies, check out [how to configure non-DUB projects](non-dub.md)
77 |
78 | You might also want to explore the [Editor Features](editing.md) code-d has to offer.
79 |
--------------------------------------------------------------------------------
/docs/images/action_auto_import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/action_auto_import.png
--------------------------------------------------------------------------------
/docs/images/action_implement_interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/action_implement_interface.png
--------------------------------------------------------------------------------
/docs/images/all_srcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/all_srcs.png
--------------------------------------------------------------------------------
/docs/images/breadcrumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/breadcrumb.png
--------------------------------------------------------------------------------
/docs/images/build_arch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_arch.png
--------------------------------------------------------------------------------
/docs/images/build_compiler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_compiler.png
--------------------------------------------------------------------------------
/docs/images/build_configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_configuration.png
--------------------------------------------------------------------------------
/docs/images/build_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_list.png
--------------------------------------------------------------------------------
/docs/images/build_run_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_run_output.png
--------------------------------------------------------------------------------
/docs/images/build_types.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/build_types.png
--------------------------------------------------------------------------------
/docs/images/calltips.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/calltips.png
--------------------------------------------------------------------------------
/docs/images/code_dfmt_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/code_dfmt_off.png
--------------------------------------------------------------------------------
/docs/images/code_formatted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/code_formatted.png
--------------------------------------------------------------------------------
/docs/images/code_linting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/code_linting.png
--------------------------------------------------------------------------------
/docs/images/code_unformatted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/code_unformatted.png
--------------------------------------------------------------------------------
/docs/images/coverage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/coverage.png
--------------------------------------------------------------------------------
/docs/images/coverage_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/coverage_bottom.png
--------------------------------------------------------------------------------
/docs/images/create_vibed_project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/create_vibed_project.png
--------------------------------------------------------------------------------
/docs/images/create_vibed_project_files.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/create_vibed_project_files.png
--------------------------------------------------------------------------------
/docs/images/ddoc_complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/ddoc_complete.png
--------------------------------------------------------------------------------
/docs/images/debug_existing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/debug_existing.png
--------------------------------------------------------------------------------
/docs/images/debug_fresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/debug_fresh.png
--------------------------------------------------------------------------------
/docs/images/debug_fresh2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/debug_fresh2.png
--------------------------------------------------------------------------------
/docs/images/debug_status_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/debug_status_bar.png
--------------------------------------------------------------------------------
/docs/images/default_srcs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/default_srcs.png
--------------------------------------------------------------------------------
/docs/images/dpldocs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dpldocs.png
--------------------------------------------------------------------------------
/docs/images/dpldocs_context_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dpldocs_context_menu.png
--------------------------------------------------------------------------------
/docs/images/dpldocs_site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dpldocs_site.png
--------------------------------------------------------------------------------
/docs/images/dub_dependency_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_dependency_list.png
--------------------------------------------------------------------------------
/docs/images/dub_json_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_json_file.png
--------------------------------------------------------------------------------
/docs/images/dub_json_file_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_json_file_big.png
--------------------------------------------------------------------------------
/docs/images/dub_panel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_panel.png
--------------------------------------------------------------------------------
/docs/images/dub_panel_full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_panel_full.png
--------------------------------------------------------------------------------
/docs/images/dub_sdl_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/dub_sdl_file.png
--------------------------------------------------------------------------------
/docs/images/ext_code_lldb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/ext_code_lldb.png
--------------------------------------------------------------------------------
/docs/images/ext_cpp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/ext_cpp.png
--------------------------------------------------------------------------------
/docs/images/ext_native_debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/ext_native_debug.png
--------------------------------------------------------------------------------
/docs/images/extension_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/extension_installed.png
--------------------------------------------------------------------------------
/docs/images/fixed_dependency_version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/fixed_dependency_version.png
--------------------------------------------------------------------------------
/docs/images/full_ddoc_complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/full_ddoc_complete.png
--------------------------------------------------------------------------------
/docs/images/full_ddoc_complete_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/full_ddoc_complete_done.png
--------------------------------------------------------------------------------
/docs/images/gc_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/gc_profile.png
--------------------------------------------------------------------------------
/docs/images/import_timing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/import_timing.png
--------------------------------------------------------------------------------
/docs/images/missing_auto_complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/missing_auto_complete.png
--------------------------------------------------------------------------------
/docs/images/missing_dependency_version.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/missing_dependency_version.png
--------------------------------------------------------------------------------
/docs/images/outline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/outline.png
--------------------------------------------------------------------------------
/docs/images/output_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/output_tab.png
--------------------------------------------------------------------------------
/docs/images/output_tab_served_dropdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/output_tab_served_dropdown.png
--------------------------------------------------------------------------------
/docs/images/project_import_paths.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/project_import_paths.png
--------------------------------------------------------------------------------
/docs/images/quick_outline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/quick_outline.png
--------------------------------------------------------------------------------
/docs/images/reload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/reload.png
--------------------------------------------------------------------------------
/docs/images/run_task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/run_task.png
--------------------------------------------------------------------------------
/docs/images/run_with_rdmd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/run_with_rdmd.png
--------------------------------------------------------------------------------
/docs/images/sorted_imports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/sorted_imports.png
--------------------------------------------------------------------------------
/docs/images/sponsor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/sponsor.png
--------------------------------------------------------------------------------
/docs/images/task_configure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/task_configure.png
--------------------------------------------------------------------------------
/docs/images/task_configure_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/task_configure_list.png
--------------------------------------------------------------------------------
/docs/images/task_generated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/task_generated.png
--------------------------------------------------------------------------------
/docs/images/tasks_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/tasks_run.png
--------------------------------------------------------------------------------
/docs/images/unsorted_imports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/unsorted_imports.png
--------------------------------------------------------------------------------
/docs/images/verbose_config_key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/verbose_config_key.png
--------------------------------------------------------------------------------
/docs/images/verbose_output_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/verbose_output_tab.png
--------------------------------------------------------------------------------
/docs/images/vibed_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/vibed_output.png
--------------------------------------------------------------------------------
/docs/images/vibed_website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/vibed_website.png
--------------------------------------------------------------------------------
/docs/images/vscode_reload_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/vscode_reload_button.png
--------------------------------------------------------------------------------
/docs/images/workspace_outline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pure-D/code-d/71992a1a52a3025f3333e4025eee0f255a8cda03/docs/images/workspace_outline.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
code-d User Guide
4 |
5 | Welcome! Thank you for installing code-d.
6 |
7 | This document describes how you can effectively use code-d and D in Visual Studio Code from the ground up.
8 |
9 | **To open this at any later point, run `Ctrl-Shift-P -> code-d: Open User Guide / Documentation`**
10 |
11 |
12 |
13 |
14 |
15 |
Join the Chat
16 |
Donate
17 |
18 |
19 |
20 |
21 | [](https://discord.gg/Bstj9bx)
22 |
23 | Discord chat
24 |
25 |
26 | Development
27 |
28 | & Support
29 |
30 |
31 |
32 |
33 | [](https://github.com/sponsors/WebFreak001)
34 |
35 | Donate for faster
36 |
37 | development on
38 |
39 | code-d and serve-d
40 |
41 |
22 |
23 | First you have to install code-d in VSCode like any other extension from the side panel in VSCode.
24 |
25 | It's possible to manually download the vsix for manual installation from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=webfreak.code-d) or the [Open VSX Registry](https://open-vsx.org/extension/webfreak/code-d).
26 |
27 | ## First time installing D
28 |
29 | If you don't have D installed, code-d will open the [D compiler download page](https://dlang.org/download.html) for you where you simply select your compiler of choice and install it for your OS.
30 |
31 | On Windows it's a good idea to restart your PC after D is installed so it is accessible from PATH from within VSCode and its extensions.
32 |
33 | After D has been installed, restart VSCode and open a D project, everything should work now.
34 |
35 | ## Verifying functionality
36 |
37 | First open a folder with a D project or a blank one to create a project in. With a folder opened, simply open any D file and then in the bottom panels, check the **Output** tab.
38 |
39 | 
40 |
41 | In here at the right you should see a drop-down menu. If you can see `code-d & serve-d` in this then it means the extension is working and running.
42 |
43 | 
44 |
45 | If you experience any issues, check this tab for possible errors and log for debugging purposes when submitting an issue.
46 |
47 | For more information in case something doesn't work, refer to [Troubleshooting](troubleshooting.md).
48 |
49 | ## First steps
50 |
51 | [Tutorial](intro-to-d.md)
52 |
--------------------------------------------------------------------------------
/docs/intro-to-d.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tutorial
4 |
5 |
22 |
23 | ## Intro to D
24 |
25 | D is a general-purpose programming language with static typing, systems-level access, and C-like syntax.
26 |
27 | There are great resources online to learn D. Check out the following selection for high quality beginner-friendly D tutorials:
28 |
29 | - [Language Reference](https://dlang.org/spec/spec.html) (official reference)
30 |
31 | Exhaustive list of all grammatical constructs in the language in easy to read language. Great for people with some previous experience in programming.
32 |
33 | Must-read at some point when programming in D.
34 |
35 | - [DLang Tour](https://tour.dlang.org/) (community-maintained)
36 |
37 | Multi language, extensive tutorial page covering a lot of basics for people with some previous experience in programming. Covers multiple topics and standard library and is a great place to check out.
38 |
39 | - [Programming in D](http://ddili.org/ders/d.en/)
40 |
41 | Great book about D. Available in English or Turkish and as Paper Book, e-Book and online website. Although having experience in other programming languages is certainly helpful, this book starts from the basics.
42 |
43 | ## Community Support
44 |
45 | - [D Forum Learn Group](https://forum.dlang.org/group/learn)
46 |
47 | Great place to ask complex questions and get the most feedback. Available online or as mailing list.
48 |
49 | - [StackOverflow](https://stackoverflow.com/)
50 |
51 | Use the `d` tag for D questions, perfect to ask general questions when there isn't anything online.
52 |
53 | - [D Language Code Club (discord)](https://discord.gg/Bstj9bx)
54 |
55 | Official Discord chat of the code-d extension. Active and fast community support for most of the day and also support for code-d issues. More links for D resources here too.
56 |
57 | ## Next Steps
58 |
59 | Start writing a [Hello World](hello-world.md) project.
60 |
--------------------------------------------------------------------------------
/docs/non-dub.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tutorial
4 |
5 |
22 |
23 | ## Configuring non-DUB projects
24 |
25 | By default code-d loads the project folder itself and then each dub project in child folders as separate root.
26 |
27 | Without dub by default it will only load the project folder itself as root but it's possible to specify multiple roots in one folder for multiple projects in one folder. For this, specify `d.extraRoots` in your workspace settings with relative paths to each folder that is supposed to be treated as separate project.
28 |
29 | In each root code-d checks if one of the following folders exist if there is no dub and the `d.projectImportPaths` user setting is not set:
30 | - `source/`
31 | - `src/`
32 |
33 | The first one off that list is going to be picked as source directory for that root. If none of those exist, the folder itself is going to be used as directory for sources. By specifying `d.projectImportPaths` it is possible to override this behavior to use a custom defined source folder path. All paths in `d.projectImportPaths` are relative to the project folder and all roots will have the same import paths with this.
34 |
35 | 
36 |
37 | You can see that imports from local files are auto-completed with no problems. However when trying to use files from external folders (such as here, the `ext/` folder) the auto completion will not find these symbols.
38 |
39 | To fix this, change `d.projectImportPaths` to `[".", "ext"]` in your workspace settings:
40 |
41 | ```json
42 | {
43 | "d.projectImportPaths": [".", "ext"]
44 | }
45 | ```
46 |
47 | 
48 |
49 | By setting this all external dependencies specified will now load properly:
50 |
51 | 
52 |
53 | ### Building
54 |
55 | If you have a very simple script without any extra dependencies outside the source folder itself, you can run each file using RDMD:
56 |
57 | 
58 |
59 | However this will not work in this case with extra custom dependencies if they are used as it will not pick them up for the imports.
60 |
61 | Otherwise you will have to define your own scripts or build tools and best integrate them in the [build task definitions](https://go.microsoft.com/fwlink/?LinkId=733558) so you can use them for [debugging](debugging.md).
62 |
--------------------------------------------------------------------------------
/docs/tutorial.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/docs/vibe-d.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tutorial
4 |
5 |