Skip to content

v0.5.0

Compare
Choose a tag to compare
@WebFreak001 WebFreak001 released this 20 Oct 20:01
· 701 commits to master since this release

Diet templates

Diet completion got a lot of bug fixes and will work a lot better with more D code now.

Adding

//-context=app.d

where 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

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.

Other Things

DCD upgrade to 0.11.1

Minor Changes:

  • 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.
  • Added d.lintOnFileOpen with 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 "always"
  • Files external to the project no longer persist linting warnings when closing anymore.

Bug Fixes:

  • 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.
  • Code actions now properly show on all characters on diagnostics instead of just the first character.
  • Fixed DCD stdout error message box on Windows on shutdown
  • Sorting imports now supports public import and static import and will also sort those before the other imports.