I recently released workspace-d¹ 2.9.1 with many new additions and I released code-d² 0.15.0 just a few hours ago.

code-d (which might be more interesting for the average reader of this thread) is my Visual Studio Code D extension with support for basically everything vscode allows me to implement. It uses workspace-d which bundles together tools like dcd or dscanner.

The big new feature in this code-d release is an automatic problem solver fixing compiler and dscanner issues. So far support is very limited and only supports importing symbols from the project that couldn't be found, but more features will come in the future.

See the new feature in action: https://twitter.com/WebFreak001/status/806614092236673024

This feature only currently works if the compiler suggests to import something (for example when trying to use writeln without stdio imported) or if the symbol is defined in the project, so it will only suggest importing files that you have created in your project and not from any dependencies or the stdlib. Furthermore it will only consider files which contain a 'module xxx;' definition, so check if your files contain that before reporting the feature not working.

I have some more features planned such as:
* removing unused variables
* making variables const/immutable
* fixing identifiers to use phobos style guidelines

If you have some more ideas for auto fixing code, post them as a reply on this forum thread or on the issue on the code-d repository³.

I can imagine having a config entry to let this feature to run automatically on save sometime in the future.

Any issues with the plugin or vscode specific enhancements should be posted to the code-d repository². Issues with autocompletion, etc or enhancements that should benefit all plugins using workspace-d should be posted on the workspace-d repository¹.

Special thanks for 5000 installs on the vscode marketplace for code-d and everyone who has contributed on any of the Pure-D projects.

If you are also interested in debugging your D code, you can use my native debug extension⁴ with gdb, lldb and mago. Also thanks for nearly 20k installs on there and every contribution.

All changes:
notable workspace-d changes:
* workspace-d now supports OSX
* there is a command to add imports to the code now (which gets used be a new code-d feature)
* dscanner and dfmt configs can now also be loaded from ~/.config
* command wrapping dscanner --findSymbol

notable code-d changes:
* installer uses the http.proxy settings now
* better error checks for invalid executables
* "line is longer than" error now starts at the correct column
* fixed installer with portable/custom git/vscode installation
* auto fix for suggested imports from compiler
* dscanner symbol search fix for missing symbols from compiler

¹: https://github.com/Pure-D/workspace-d
²: https://github.com/Pure-D/code-d
³: https://github.com/Pure-D/code-d/issues/72
⁴: https://marketplace.visualstudio.com/items?itemName=webfreak.debug

Reply via email to