Platform attributes on supported values in dub.sdl are now autocompleted. This includes all the current platforms, architectures and compilers.
Furthermore dependencies complete better now when completing in the middle of a word.
unusedvariables warnings will now be rendered using the standard vscode formatting
- Removed upload code selection feature. Use a dedicated extension for this instead. (for example "Share Code"
New release mechanism
d.betaStream setting is now obsolete and got replaced by
d.servedReleaseChannel offers 4 different modes:
stable: this behaves like previously having
d.betaStreamset to false but additionally now will always fetch newer releases directly from GitHub without a new code-d being needed to be installed first.
beta: this is a new option which behaves much like
stable, but additionally to the release builds from GitHub also downloads the pre-release versions. These can be considered mostly stable and will be released in more frequent update iterations. Pick this release channel if you want to report extension issues early.
nightly: this option behaves similar to
d.betaStreamset to true. However now only pre-compiled versions will be downloaded and additionally these versions are only released past midnight UTC and only if all tests pass. This new option combines the fast iterations of betaStream with more stable releases that will not cause compilation errors.
frozen: this option completely disables the update check on GitHub and only uses the locally installed serve-d. However if serve-d is not installed or broken, code-d will still attempt to download it from the newest stable version.
Diet completion got a lot of bug fixes and will work a lot better with more D code now.
app.d is the primary file in which the template is used will result in improved completion. This comment must be the first token of the file (or second line if first is extends) and the context file must have been opened.
For this serve-d will search for a string using the diet template filename (without folder, but with extension) in the code.
Currently this is not enabled by default because it is still completing too many symbols which aren't even accessible. To enable it anyway, set
"d.dietContextCompletion": true in your user settings.
More & improved code actions
Implement interface got even more stable and now uses snippets to quickly navigate between implemented methods. It also now puts all methods at the bottom of a class instead of at the top. For default implementations sometimes you can also pick between multiple implementations.
Dub errors now report and disappear much more consistently and have had extreme performance improvements. Template instances will be reported both in calling parts in your projects and where the error actually instantiated first. All error messages will now properly show the following error messages as location markers when hovering over the root cause and suggest only jumping there instead of marking them as invalid.
Saving a file with dub linting enabled will also no longer run the pre/post build commands and only update errors in the current dub project. To show errors in other projects save files in other projects.
You can now use new context variables in
when clauses in vscode settings like keyboard shortcuts. Added are:
d.hasDubProjectwhich is true if there is a project with dub enabled (when the dub outline is visible)
DCD upgrade to 0.11.1
- DCD now downloads with a rich download UI in newer code-d and with console progress bar in older code-d or other editors
- Import paths are now much better resolved if dmd is installed. They will use a very accurate search on Posix platforms using dmd.conf and on windows relative to the exe path. Also per-project overrides using dmd.conf are possible with this.
d.lintOnFileOpenwith possible values
"always", "project", "never"which controls whether files should be linted with DScanner when opening. (defaults to "project") To revert this to always lint every file, including phobos and other libraries, change it to
- Files external to the project no longer persist linting warnings when closing anymore.
$dmdproblem matcher to build tasks.
- Build tasks now finally work properly
- The statusbar now only loads once dub is ready.
- Some memory optimizations and segfault fixes.
- Dub build task doesn't break anymore for not loaded workspaces.
- Some threading issues fixed which previously caused random crashes.
- Unreadable directories don't crash serve-d startup anymore.
- Fixed several "Sort imports" bugs.
- Module name insertion properly takes the longest import path now for determining the module name, so it will always insert the shortest module name for your imports.
- When uninstalling code-d an uninstall script deleting the code-d folder should run now.
- Code actions now properly show on all characters on diagnostics instead of just the first character.
- DML autocompletes again
- Installation will no longer silently halt if dependencies aren't installed
- Serve-D installation will now fall back to x86 if x86_mscoff isn't available (fixes installation if only LDC is available)
- Fixed DCD stdout error message box on Windows on shutdown
- Sorting imports now supports
static importand will also sort those before the other imports.
- Fixed code coverage highlighting on Windows
When compiling serve-d from source, don't inline (fixes fatal OSX bug)
Upgrade serve-d to 0.4.1, fix installation of serve-d and DCD deleting itself.
Invalid dub configurations and dependencies don't fatally crash serve-d anymore.
You can now just fix your syntax mistakes and save the file again (or maybe twice for good measure) and it will magically just start working again!
Dependency issues also no longer cause issues as they are now loaded and upgraded in-memory if there are any missing, keeping your working directory clean while making sure that everything is working.
Embedded Documentation View
Don't open your browser to browse phobos and other project documentation anymore.
You can now browse through the online documentation of Phobos and all your dub dependencies using the new embedded documentation browser powered by dpldocs.info.
Just open up your command palette and search for
Search dpldocs for Phobos & Dependency documentation or press
Ctrl-Q Ctrl-Q by default. You can also map this to a keyboard shortcut to make this even easier to access.
This is a really useful command, try it out!
vibe.d Diet templates have gotten a lot of love.
New features include:
- Auto-Completion + Calltips of D code inside diet + HTML Tag & Attribute Name & Value completions
- Proper language config (autoclosing quotes)
New Syntax Highlighting
If you were often frustrated with how random the old syntax highlighting was, it has now been made a lot more consistent and less buggy in general.
Check out a comparision on https://twitter.com/WebFreak001/status/1079446928256053249
Implement interface improvements
The implement interface code action will no longer insert duplicate code and a lot more tests have been added to ensure correctness.
If you do OOP, try it out by simply extending an interface or abstract class and going on the inherited symbol with your cursor.
If you have
d.argumentSnippets enabled, you will now have a much cleaner experience. Types and default values are no longer passed inside the snippets, so only variable names are put in inside the function arguments.
This makes it much easier to especially write OOP code or code where your variables are often called the same thing as the arguments.
Additionally autocompletion no longer shows duplicates of the same symbols. The documentation and definition of all symbols with same name, kind are merged into one for the autocompletion.
You can revert this back to a slightly modified version using
"d.completeNoDupes": false, symbols with same name, kind and definition are always merged now however.
Convert between dub JSON and SDL
You can now convert dub package recipes between JSON/SDL using a click on the convert button in the toolbar or by running the "Convert between dub.json/dub.sdl" command while having the recipe open. You can still undo after conversion if it missed something or you noticed you had comments it removed.
The server now tries to restart more. It now only doesn't restart after 20 restart fails in one minute instead of 5 fails in 3 minutes.
Implemented proper outline view and with that also breadcrumbs. See #201
Fixed an SDL parsing issue with comments not consuming line endings. Comments won't affect parsing of the next line anymore.
When opening a file, it will get linted by D-Scanner immediately.
serve-d upgrade to 0.4.0
DCD upgrade to 0.10.1
Coverage and GC decorations (red/green background tint and allocation code lenses) can now be toggled with the new
d.enableGCProfilerDecorations settings respectively. Coverage will always still show in the statusbar.
Status bar items will now only be shown when a D file is opened. You can revert this to the old behaviour by setting
true in your user or workspace settings to bring back dub buttons and you can enable
d.alwaysShowCoverageStatus to do the same to the coverage status indicator.
The installation of DCD is fixed and reloading after installation is no longer required.
- removed long gone dscannerPath and dfmtPath from the settings (as they are integrated into serve-d and have been ignored ever since)
- Workspace symbol search now shows all symbols starting with the search query.
- DScanner issues can now be disabled per workspace and per line of code (using
@supress(xxx)in the same line as the issue, a code fix helps removing it)
- Build tasks replace the old compile buttons in the status bar (Ctrl-Shift-B)
serve-d upgrade to 0.3.0
Fixed fsworkspace provider and
d.extraRoots not working. (serve-d update to 0.2.1)
Update to workspace-d v3!
This release finally includes multi workspace support. You can manually add instances using the new
d.extraRoots setting and prevent automatic instance detection partially using
d.disabledRootGlobs or disable it fully using
"d.scanAllFolders": false to get back to the old behaviour (but still with working multi-root workspaces).
Some bugs may occur and some old ones may have been fixed during this transition. Please report issues to the code-d github repository.
Project dependent settings such as the status bar buttons or the dub dependencies are linked to the project containing the file you are currently editing.
- Dependency upgrades (dub to 1.10.0, dfmt to 0.8.2, dscanner to 0.5.7)
- Settings are now properly categorized for multi-workspace projects and some settings can be set in all cases and some only in user settings.
- DCD is now fetched from the official github releases (0.9.9)
- dub.json completion now properly inserts quotes
- some dub startup errors were fixed
- import timing takes into account possible second-run optimizations.
- some requests in code-d were previously decoded wrong, causing silent ignoring of some configuration and parameters. This has been fixed with a single character.
Fixed a bug where
d.betaStream would have recloned serve-d on every startup if the latest commit has been made on a 10th of any month or later or if the last digit of the current compiled serve-d date was less than the commit date.
Upgrade language client to 4.1.3
DCD Installation fixes, especially on windows.
The switch to serve-d / Microsoft Language Server Protocol!
- Added dub dependencies view in the UI that shows a dependency tree in the currently opened project
- New syntax highlighting using ysgard/d-struct grammar
- automatic module naming: when you rename a file you are currently in or create a new file a module statement will be added/changed
- the English, German and Japanese translations are finally used! Thanks to @SeijiFujita for the Japanese translation
- dfmt and dscanner are now included in serve-d and workspace-d and no longer need to be installed
- Fancy new ddoc renderer when hovering over symbols
- Live DScanner linting: you get errors from dscanner while you type now
- dscanner.ini auto completion of sections, fields & values
- ddoc auto completion: press ctrl-space before a function definition and select the /// or the /** completion option to get a documentation template with arguments and sections
- added sort imports command only sorting the "block" (separated by whitespaces) and not all imports in the file for more user control (but not compatible with the dscanner sortedness linting)
- When autocompleting functions automatically insert the signature as snippet which can be navigated using tab. (configuration d.argumentSnippets)
- Automatically implement classes and interfaces using the new
Implement selected interface/base classcommand or by using the code actions
- All imports are annotated with a code lens to show how long they need to import. For this just a dmd call using just the import is called multiple times (up to 500ms per import).
- DCD Compilation is fixed (especially on windows)
- Installing dependencies uses the dubPath setting now for dub
- dub.json auto completion was broken in an vscode update, should work again now
- Dub installer upgraded to 1.4.0
- Dependent programs are now installed without user confirmation by default
"d.aggressiveUpdate": falseto disable this behaviour.
- On linux files are installed into
~/.local/share/code-dor as fallback (and also on mac) into
~/.code-d. On Windows files are installed into
- Will now install dub before trying to compile dependencies
- If no D compiler is present the browser will be opened on the D download page
- Dedicated output channel in the output tab for error messages & alike
- Current parameter in calltips is more exact now
- Goto definition got more efficient
- Fix dub.json/dub.sdl snippets on vscode 1.13.0 and above
- Auto-fix broken tool paths when upgrading code-d
- Fixed windows dscanner exe path
- Fixed goto definition in unopened files
- Better default stdlibPath values (platform dependent) + snippets for it
- Import fixer will suggest stdlib & works with UFCS
- Bump to workspace-d 2.10.0
- Primarily makes importer better
- Finds outdated DCD/Dscanner/dfmt now (warnings/update not yet implemented in code-d)
- Fixed installation on macOS
- 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
- File paths from any custom error messages generated using pragma(msg) will get checked through string import paths now to fix file names (for example compiling diet template files will have the correct path now)
- Running a dub build for linting when a diet file is saved
- Switched from .editorconfig to vscode user settings for dfmt formatting settings.
- Updating workspace-d when outdated