You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-src/editing.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,10 @@ Note that there may be more items than what is completed but due to the nature o
14
14
15
15

16
16
17
+
When writing symbol names, which are not available in the current scope, code-d will suggest importable symbols (e.g. `auto-import from std.module`), where it will automatically add a module-wide import when confirming the import. This behavior can be toggled through the setting `d.enableAutoImportCompletions` (requires an [enabled index](#symbol-index)).
18
+
19
+

20
+
17
21
#### Linting
18
22
19
23
While typing, code-d will automatically do static style checks on your code and warn you of possible bad code conventions.
@@ -148,6 +152,14 @@ Right before a function definition typing `///`, `/++` or `/**` and auto complet
148
152
149
153
When completing snippets, it is possible for third party extensions to provide custom D snippets auto completing at specific grammatical scopes and only when certain DUB dependencies are active in the workspace.
150
154
155
+
### Local-use / scope highlighting
156
+
157
+
When the text cursor is on a variable, usages of that variable will be slightly highlighted. Similarly to this when the text cursor is on keywords like `switch`, `if`, `else`, `return`, `break` or `continue`, the affected control flow is highlighted.
158
+
159
+
Control flow highlighting can be toggled using the `d.enableFallbackHighlight` setting. Variable use highlighting can be toggled using the `d.enableDCDHighlight` setting.
It's possible to show how long each import takes in compile time by enabling the `d.enableDMDImportTiming` setting. However this only gives very rough estimates, depends on constant system performance to be useful and can degrade performance so it's not enabled by default.
@@ -171,3 +183,22 @@ When clicking this a summary of the covered lines is opened. (currently disfunct
171
183
If there is a profilegc.log file generated by dmd in the project, either generated with DUB using the build type `profile-gc` or generated using the compiler flag `-profile=gc`, then all allocations will be displayed in the editor at the points where allocations occured, along with the count how often was allocated:
172
184
173
185

186
+
187
+
### Inlay hints
188
+
189
+
There are optional inlay hints available. These are currently the raw output from DCD and are not very useful at this point in time, but will improve with further updates to DCD and can be used by simply updating DCD.
190
+
191
+
These have to be enabled using the setting `d.enableInlayHints`.
192
+
193
+

194
+
195
+
## Symbol Index
196
+
197
+
There is a fairly resource heavy setting called `d.enableIndex`, which enables an index of the project. Libraries are cached so that the index only needs to be built once. This index can take a minute to build, especially on slow machines and uses a constant amount of memory (could take up to a few hundred MB).
198
+
199
+
This is enabled by default due to the useful features it adds, but can be disabled to go back to a lighter behavior similar to version 0.7.x of code-d.
Copy file name to clipboardExpand all lines: docs/building.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ To get a list of supported build and run operations for your project within VSCo
36
36
37
37
You can copy the tasks into the special `.vscode/tasks.json` file by pressing the cog icon on the detected tasks. To quickly launch one of the configured tasks, press `Ctrl-Shift-B` or `Run Build Task` in the command palette to immediately run the build task or select from your custom defined list of build tasks.
38
38
39
-
When you select a build task, for example `"Run <project name>"`, it will pop up in the integrated command line in VSCode:
39
+
When you select a build task, for example `"dub: Run <project name>"`, it will pop up in the integrated command line in VSCode:
40
40
41
41

Copy file name to clipboardExpand all lines: docs/editing.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,10 @@ Note that there may be more items than what is completed but due to the nature o
32
32
33
33

34
34
35
+
When writing symbol names, which are not available in the current scope, code-d will suggest importable symbols (e.g. `auto-import from std.module`), where it will automatically add a module-wide import when confirming the import. This behavior can be toggled through the setting `d.enableAutoImportCompletions` (requires an [enabled index](#symbol-index)).
36
+
37
+

38
+
35
39
#### Linting
36
40
37
41
While typing, code-d will automatically do static style checks on your code and warn you of possible bad code conventions.
@@ -166,6 +170,14 @@ Right before a function definition typing `///`, `/++` or `/**` and auto complet
166
170
167
171
When completing snippets, it is possible for third party extensions to provide custom D snippets auto completing at specific grammatical scopes and only when certain DUB dependencies are active in the workspace.
168
172
173
+
### Local-use / scope highlighting
174
+
175
+
When the text cursor is on a variable, usages of that variable will be slightly highlighted. Similarly to this when the text cursor is on keywords like `switch`, `if`, `else`, `return`, `break` or `continue`, the affected control flow is highlighted.
176
+
177
+
Control flow highlighting can be toggled using the `d.enableFallbackHighlight` setting. Variable use highlighting can be toggled using the `d.enableDCDHighlight` setting.
It's possible to show how long each import takes in compile time by enabling the `d.enableDMDImportTiming` setting. However this only gives very rough estimates, depends on constant system performance to be useful and can degrade performance so it's not enabled by default.
@@ -189,3 +201,22 @@ When clicking this a summary of the covered lines is opened. (currently disfunct
189
201
If there is a profilegc.log file generated by dmd in the project, either generated with DUB using the build type `profile-gc` or generated using the compiler flag `-profile=gc`, then all allocations will be displayed in the editor at the points where allocations occured, along with the count how often was allocated:
190
202
191
203

204
+
205
+
### Inlay hints
206
+
207
+
There are optional inlay hints available. These are currently the raw output from DCD and are not very useful at this point in time, but will improve with further updates to DCD and can be used by simply updating DCD.
208
+
209
+
These have to be enabled using the setting `d.enableInlayHints`.
210
+
211
+

212
+
213
+
## Symbol Index
214
+
215
+
There is a fairly resource heavy setting called `d.enableIndex`, which enables an index of the project. Libraries are cached so that the index only needs to be built once. This index can take a minute to build, especially on slow machines and uses a constant amount of memory (could take up to a few hundred MB).
216
+
217
+
This is enabled by default due to the useful features it adds, but can be disabled to go back to a lighter behavior similar to version 0.7.x of code-d.
0 commit comments