djs-vscode 0.1.0: D in VS Code, answered by the compiler frontend, in-process (preview)

Paolo Invernizzi paolo.invernizzi at gmail.com
Mon Oct 19 15:40:22 UTC 2026


The VS Code extension I mentioned in the djs thread is out.

Marketplace: 
https://marketplace.visualstudio.com/items?itemName=deepglance.djs-vscode
Source: https://github.com/DeepGlance/djs-vscode (the compiler: 
https://github.com/DeepGlance/djs)

It runs the LDC 1.43.0 frontend, ported to TypeScript, in a 
worker thread of the extension host. No language server, no 
binary, nothing to install besides the extension: the LDC import 
tree is bundled. Open a folder with D files and it compiles them 
with `ldc2 -i -I<folder>` (plus source/ or src/ if present); set 
`djs.ldc2Line` to your real build line when you have one, 
including -version, -I, -J and --d-version.

What you get is what the compiler says: diagnostics on the 
unsaved buffer after a pause, hover with the resolved type and 
the doc comment (UFCS included), go to definition and references 
across modules, rename, outline, signature help, inlay hints, 
completion with and without a dot, and the branches that your 
version/static if conditions exclude shown dimmed. String mixins, 
template instances and folded values carry a lens: one click 
shows the generated D, and the outline lists the declarations a 
mixin produces. Three targets are selectable (arm64 macOS, 
aarch64 and x86_64 Linux) and the dimming follows the target. 
There is also an AST view beside the source, the -vcg-ast output.

Because it is the 1.43 frontend itself, the new data-flow 
analysis is there too: add -preview=fastdfa to djs.ldc2Line and 
its null-dereference, uninitialised-read and false-assert errors 
show up on every compile, identical to ldc2's.

It is different from dmd-lsp (announced here in September): that 
one runs dmd as a library behind a server; this one runs the 
frontend inside the editor process, which is why there is nothing 
to install.

Limits, preview: macOS arm64 and Linux hosts only; a compile of a 
big module takes 2-3 s and the engine is memory hungry; on some 
large codebases every compile is from scratch instead of 
incremental; `asm {}` blocks are skipped with a warning (licence, 
see LICENSE). The frontend is frozen at 1.43.0: the next release 
is the test of how much of the port method carries over, and I 
will report the number here.

Feedback welcome, Linux reports especially.

/P



More information about the Digitalmars-d-announce mailing list