Skip to content

Commit 3a0825c

Browse files
committed
update documentation on new features for 0.25.0
1 parent 6fb6dfa commit 3a0825c

File tree

9 files changed

+184
-4
lines changed

9 files changed

+184
-4
lines changed

CHANGELOG.md

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Discord chat
1717

1818
[![Sponsor me on GitHub Sponsors](images/sponsor.png)](https://github.com/sponsors/WebFreak001)
1919

20-
Donate for faster
20+
Support me for
2121
<br>
2222
development on
2323
<br>
@@ -27,6 +27,123 @@ code-d and serve-d
2727
</tr>
2828
</table>
2929

30+
# 0.25.0
31+
32+
## IDE Features
33+
34+
- Introduced a **project-wide symbol index**:
35+
- Fast symbol search, references, and auto-import suggestions
36+
- Fuzzy search support
37+
- Auto-import while typing
38+
39+
- Added **local symbol renaming** and improved reference finding.
40+
- Implemented **async project loading** for better responsiveness.
41+
- Added support for code folding (imports, functions, semantic blocks), improved document outlines, and LSP Inlay Hints.
42+
- Added D error link provider — makes compiler/mixin error messages clickable in the terminal.
43+
- Automatic continuation of doc comments and line comments
44+
45+
## DUB & Project Management
46+
47+
- Major **DUB integration overhaul**:
48+
- Improved dependency resolution, linting, and error reporting
49+
- Auto-download missing dependencies with confirmation
50+
- Better handling of dependency versions, paths, and overrides
51+
- Improved DUB schema validation (JSON + SDL)
52+
- Added dependency sorting, deduplication, and fuzzy matching
53+
- **DUB recipe editor GUI is now a separate extension** -> `webfreak.dub-editor`
54+
55+
- Enhanced **dependency view UI**:
56+
- Configurable click behavior
57+
- Rich previews (README, CHANGELOG, LICENSE, RST)
58+
- Right-click actions (open recipe, open on dpldocs, etc.)
59+
60+
- Support for **dub.sdl formatting**, snippets, path completion, and validation.
61+
62+
## Completions & Code Actions
63+
64+
- Improved **auto-import suggestions**:
65+
- Avoid duplicates
66+
- Respect visibility and public imports
67+
- Integrate snippet-based imports
68+
69+
- Added many **new snippets**:
70+
- Simple control flow snippets, feeling like auto-complete (`switch`, `with`, `scope`)
71+
- Smart snippets for `if`/`else`, `try`/`catch`, `foreach` - appear depending on context
72+
73+
- Added code actions:
74+
- **Import sorting** (can be enabled automatically through `editor.codeActionsOnSave` -> `source.organizeImports`)
75+
- Errorfix suggestions through "light bulbs" (e.g. on unknown symbol -> `import std.algorithm`)
76+
77+
## Syntax Highlighting & Documentation
78+
79+
- Major syntax highlighting improvements:
80+
- Static `foreach`, casts, enums, interpolated strings
81+
- Improved type, brace, semicolon, comment, and token handling
82+
83+
- Added support for:
84+
- Ddoc tables, colors, HTML, and trusted markdown
85+
- Automatic continuation of doc and line comments
86+
87+
- Fixed numerous long-standing highlighting edge cases.
88+
89+
## Debugging, Diagnostics & Stability
90+
91+
### Error Handling
92+
93+
- Clickable compiler and mixin errors
94+
- Improved DMD/LDC/GDC error parsing
95+
- Clearer diagnostics for DUB, DCD, and D-Scanner failures
96+
- Added `served/getInfo` and extended diagnostic dump commands
97+
98+
### Crash & Bug Fixes
99+
100+
- Fixed crashes related to:
101+
- DCD / D-Scanner
102+
- JSON-RPC handling (editors outside vscode)
103+
- Windows, BSD, macOS/ARM
104+
105+
- Improved robustness of configuration loading and protocol handling
106+
- Reduced memory usage and GC pressure in RPC & indexing code
107+
108+
## Configuration & UX Improvements
109+
110+
- Revamped settings UX with better documentation
111+
- New settings:
112+
- `d.ccdbPath`
113+
- `d.dependencyClickBehavior`
114+
- `d.dependencyTextDocumentFilter`
115+
- `d.enableAutoImportCompletions`
116+
- `d.enableDCDHighlight`
117+
- `d.enableFallbackHighlight`
118+
- `d.enableIndex`
119+
- `d.enableInlayHints`
120+
- `d.manyProjectsAllowList`
121+
- `d.manyProjectsDenyList`
122+
- `dscanner.excludedFiles`
123+
- Compiler selection is now machine-specific (better for remote dev like through SSH or WSL)
124+
- Improved startup behavior and reload notifications
125+
- Better handling of missing or partial LSP client capabilities
126+
127+
## Internal Architecture & Maintenance
128+
129+
- Major refactors:
130+
- Merged `workspace-d` into `serve-d`
131+
- Migrated protocol & RPC code from `painlessjson` to `mir-ion` (should include minor performance and memory improvements)
132+
- Clean separation of protocol, serverbase, and indexing layers
133+
134+
- Improved JSON-RPC implementation:
135+
- Streaming responses (mostly unsupported in VSCode currently)
136+
- Better error reporting
137+
- Timeout and tracing support
138+
139+
- Modernized codebase (ESLint, Prettier, autoformat, refactors)
140+
141+
## Documentation & Ecosystem
142+
143+
- Improved onboarding and walkthrough experience
144+
- Added Code of Conduct and updated sponsorship acknowledgements
145+
- Improved README, docs formatting, and links
146+
30147
# 0.24.0
31148

32149
## Completion

docs-src/editing.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Note that there may be more items than what is completed but due to the nature o
1414

1515
![using snippets](video_snippets.gif)
1616

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+
![auto import example](images/auto_import.png)
20+
1721
#### Linting
1822

1923
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
148152

149153
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.
150154

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.
160+
161+
![scope highlighting examples](images/code_highlighting.png)
162+
151163
### D Import timing
152164

153165
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
171183
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:
172184

173185
![gc profile example](images/gc_profile.png)
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+
![inlay hints example](images/inlay_hints.png)
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.
200+
201+
The following features use the symbol index:
202+
203+
- Find references
204+
- Auto-import suggestions (import on completion + code actions / light bulbs)

docs-src/include/sponsor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Development
2020

2121
[![Sponsor me on GitHub Sponsors](images/sponsor.png)](https://github.com/sponsors/WebFreak001)
2222

23-
Donate for faster
23+
Support me for
2424
<br>
2525
development on
2626
<br>

docs/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To get a list of supported build and run operations for your project within VSCo
3636

3737
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.
3838

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:
4040

4141
![command run output](images/build_run_output.png)
4242

docs/editing.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Note that there may be more items than what is completed but due to the nature o
3232

3333
![using snippets](video_snippets.gif)
3434

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+
![auto import example](images/auto_import.png)
38+
3539
#### Linting
3640

3741
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
166170

167171
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.
168172

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.
178+
179+
![scope highlighting examples](images/code_highlighting.png)
180+
169181
### D Import timing
170182

171183
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
189201
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:
190202

191203
![gc profile example](images/gc_profile.png)
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+
![inlay hints example](images/inlay_hints.png)
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.
218+
219+
The following features use the symbol index:
220+
221+
- Find references
222+
- Auto-import suggestions (import on completion + code actions / light bulbs)

docs/images/auto_import.png

59.1 KB
Loading

docs/images/code_highlighting.png

65.7 KB
Loading

docs/images/inlay_hints.png

9.89 KB
Loading

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Development
3232

3333
[![Sponsor me on GitHub Sponsors](images/sponsor.png)](https://github.com/sponsors/WebFreak001)
3434

35-
Donate for faster
35+
Support me for
3636
<br>
3737
development on
3838
<br>
@@ -41,6 +41,7 @@ code-d and serve-d
4141
</td>
4242
</tr>
4343
</table>
44+
4445
Click a link below to open pages about certain topics.
4546

4647
<!-- #include menu.md -->

0 commit comments

Comments
 (0)