www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Code formatting and documentation on hover in VisualD?

reply blizzard <bliz zar.d> writes:
Hello,
I mostly use vscode, but because I read somewhere that for Dlang 
VisualD is better, so I am trying in out. But does it support 
code formatting and showing documentation on hover like the 
vscode plugin? Because both these features are not working for me 
in VisualD.
Jul 14 2020
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 14/07/2020 09:14, blizzard wrote:
 Hello,
 I mostly use vscode, but because I read somewhere that for Dlang VisualD
 is better, so I am trying in out. But does it support code formatting
 and showing documentation on hover like the vscode plugin? Because both
 these features are not working for me in VisualD.
Visual D supports "formatting" with regard to indentation, but not reflowing the code across multiple lines. Documentation should show up in tool tips as long as it is written in ddoc style. Not sure if the D extensions in VS code also grab other comments.
Jul 17 2020
parent reply blizzard <bliz zar.d> writes:
On Saturday, 18 July 2020 at 06:34:23 UTC, Rainer Schuetze wrote:
 Visual D supports "formatting" with regard to indentation, but 
 not reflowing the code across multiple lines.
Can you please add support for https://github.com/dlang-community/dfmt or whatever the vscode extension uses.
 Documentation should show up in tool tips as long as it is 
 written in ddoc style.
I don't know what ddoc style comment is but this is what I get https://imgur.com/NxmWUDk for every symbol that I have tried it on.
 Not sure if the D extensions in VS code also grab other 
 comments.
The VSCode extension provides an option to search a particular symbol in dpldocs and then opens its corresponding page in vscode itself.
Jul 18 2020
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 18/07/2020 09:03, blizzard wrote:
 On Saturday, 18 July 2020 at 06:34:23 UTC, Rainer Schuetze wrote:
 Visual D supports "formatting" with regard to indentation, but not
 reflowing the code across multiple lines.
Can you please add support for https://github.com/dlang-community/dfmt or whatever the vscode extension uses.
You are not the first to ask, but I'm not a big fan of these auto-formatters. So I wouldn't hold my breath, but pull request welcome... ;-)
 Documentation should show up in tool tips as long as it is written in
 ddoc style.
I don't know what ddoc style comment is but this is what I get https://imgur.com/NxmWUDk for every symbol that I have tried it on.
ddoc style is the way to get documentation as built into the compiler. Most documentation is written this way. Indeed, there are/were some troubles with modules not loaded in the editor and templates, readln is an example for both issues. I have fixed these, please try https://github.com/dlang/visuald/releases/tag/v1.0.1-beta1
 Not sure if the D extensions in VS code also grab other comments.
The VSCode extension provides an option to search a particular symbol in dpldocs and then opens its corresponding page in vscode itself.
If you press F1 on an identifier Visual D will take you to its documentation that was installed with the compiler.
Jul 19 2020
next sibling parent blizzard <bliz zar.d> writes:
On Sunday, 19 July 2020 at 14:58:08 UTC, Rainer Schuetze wrote:

 Indeed, there are/were some troubles with modules not loaded in 
 the editor and templates, readln is an example for both issues.

 I have fixed these, please try 
 https://github.com/dlang/visuald/releases/tag/v1.0.1-beta1

 Not sure if the D extensions in VS code also grab other 
 comments.
The VSCode extension provides an option to search a particular symbol in dpldocs and then opens its corresponding page in vscode itself.
If you press F1 on an identifier Visual D will take you to its documentation that was installed with the compiler.
thank you, it works...
Jul 20 2020
prev sibling parent reply blizzard <bliz zar.d> writes:
On Sunday, 19 July 2020 at 14:58:08 UTC, Rainer Schuetze wrote:
 On 18/07/2020 09:03, blizzard wrote:
 On Saturday, 18 July 2020 at 06:34:23 UTC, Rainer Schuetze 
 wrote:
 Visual D supports "formatting" with regard to indentation, 
 but not reflowing the code across multiple lines.
Can you please add support for https://github.com/dlang-community/dfmt or whatever the vscode extension uses.
You are not the first to ask, but I'm not a big fan of these auto-formatters. So I wouldn't hold my breath, but pull request welcome... ;-)
I set up dfmt using https://docs.microsoft.com/en-us/visualstudio/ide/managing-external-tools?view=vs-2019 Works good enough for me :D
Jul 20 2020
parent reply Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Monday, 20 July 2020 at 14:03:32 UTC, blizzard wrote:
 I set up dfmt using 
 https://docs.microsoft.com/en-us/visualstudio/ide/managing-external-tools?view=vs-2019
 Works good enough for me :D
Nice! For the impatient VS 2019 user: Tools -> External Tools... Add Title: d&fmt Command: C:\D\dmd2\windows\bin\dub.exe Arguments: run dfmt -- --inplace $(ItemPath) Initial Directory: $(ItemDir) v Close on exit Now Alt+T Alt+F will reformat the current file on disk. If you forgot to save the file first, VS will warn that the file changed on disk and ask if you want to discard unsaved changes; Reply No, save and try again. -- Bastiaan.
Nov 18 2020
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Wednesday, 18 November 2020 at 20:41:46 UTC, Bastiaan Veelo 
wrote:
 On Monday, 20 July 2020 at 14:03:32 UTC, blizzard wrote:
 I set up dfmt using 
 https://docs.microsoft.com/en-us/visualstudio/ide/managing-external-tools?view=vs-2019
 Works good enough for me :D
Nice! For the impatient VS 2019 user: Tools -> External Tools... Add Title: d&fmt Command: C:\D\dmd2\windows\bin\dub.exe Arguments: run dfmt -- --inplace $(ItemPath) Initial Directory: $(ItemDir) v Close on exit Now Alt+T Alt+F will reformat the current file on disk. If you forgot to save the file first, VS will warn that the file changed on disk and ask if you want to discard unsaved changes; Reply No, save and try again. -- Bastiaan.
Good to know
Jan 09