digitalmars.D.ide - Visual D issues and suggestions
- John Chapman (41/41) Oct 21 2018 Rainer, you may have a lot of these on your to-do list, but I've
- Rainer Schuetze (38/75) Oct 22 2018 I will have to delegate most of these to the author of the semantic
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (12/14) Oct 22 2018 I was able to do some decent (at least, from I've tested it
- Rainer Schuetze (7/20) Oct 23 2018 Thanks for the hint. I guess the diff only works if the rest of the code
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (12/19) Oct 24 2018 No, it works even if the rest of the code isn't properly
- John Chapman (24/50) Oct 22 2018 No - inside a class, if you type "override" then ctrl-space, it
- Rainer Schuetze (12/59) Oct 23 2018 Ah, ok. That's a completion containing newlines that need to be
- John Chapman (10/16) Oct 24 2018 I installed it at the weekend on VS2017 15.8 and it actually
- John Chapman (7/9) Oct 23 2018 To reproduced this, try declaring an unnamed enum with a
- Rainer Schuetze (3/42) Nov 03 2018 I have added most of these here:
- John Chapman (4/6) Nov 03 2018 Thanks - I didn't know VisualD bugs could be reported there too.
Rainer, you may have a lot of these on your to-do list, but I've been noting some of the minor issues I've come across using Visual D and it might be useful for future releases. Fixes: * The Intellisense list for __traits needs updating inline with the spec. * Remove obsolete "classinfo" from completion list. * Add "typeof" keyword to completion list. * Show completion list when typing UDAs. * Support new contract expressions (and upcoming mixin tuple syntax). * Indent function bodies correctly when generating overrides. * Indenting for enum members is sometimes too much. * Tooltips on token-string literals adds a lot of extra spacing between symbols. * Tooltips that show documentation can have excessive line breaks. * Tooltips on variables repeat attributes - eg, "private int length;" produces "private private(int) [parent].length" instead of perhaps "(variable) private int [parent].length". * Remove duplicated/disabled entries for "New filter"/"New folder" in Solution Explorer > context menu > Add. * Fix Visual D Search text boxes and buttons for high DPI displays. Suggestions: * Add option to not indent switch case labels. * Add refactoring/renaming support. * When insertion point is inside variable or type name, highlight usages. * For Visual D projects, include option to compile/link in single step. * Automatically include modules in the current project as candidates for completion - I seem to have to add my project folders to Visual D Settings > DMD Directories > Import paths * Colourise type names and UDAs in editor. * Ctrl-click for "Go to definition". * When user declares variables, suggest possible names based on type - eg, a variable of type "FontFaceReference" pops up a list including "fontFaceReference", "fontFace" and "reference". * Fade out unused imports. Hope this is useful.
Oct 21 2018
On 21/10/2018 12:11, John Chapman wrote:Rainer, you may have a lot of these on your to-do list, but I've been noting some of the minor issues I've come across using Visual D and it might be useful for future releases.Thank you for this extensive list.Fixes: * The Intellisense list for __traits needs updating inline with the spec. * Remove obsolete "classinfo" from completion list. * Add "typeof" keyword to completion list. * Show completion list when typing UDA> * Support new contract expressions (and upcoming mixin tuple syntax).I will have to delegate most of these to the author of the semantic engine. Fortunately he has continued to work on it after a couple of years.* Indent function bodies correctly when generating overrides.I guess you mean indentation if "override" is on the line before the function declaration? That happens for any function attribute (or even I was considering integrating dfmt at some point but it seems formatting just a selection doesn't work too well with it.* Indenting for enum members is sometimes too much.Can you provide an example?* Tooltips on token-string literals adds a lot of extra spacing between symbols.You mean the space between each token? Yes, that's bad. It should be shown as is.* Tooltips that show documentation can have excessive line breaks.I haven't found a way to format tooltips better than just plain text. What you see is more or less how it is written in the source code.* Tooltips on variables repeat attributes - eg, "private int length;" produces "private private(int) [parent].length" instead of perhaps "(variable) private int [parent].length".I recently stumbled over a strange extern(function_name), too. I'll look into that.* Remove duplicated/disabled entries for "New filter"/"New folder" in Solution Explorer > context menu > Add.These are two slightly different items: "filter" is what you get in a* Fix Visual D Search text boxes and buttons for high DPI displays.Ok, I've tried Visual D on a HiDPI screen yet.Suggestions: * Add option to not indent switch case labels.In the long run, it should probably follow dfmt's .editorConfig options (no idea if there is something about switch/case in there, though).* Add refactoring/renaming support.That's a tough one as it requires almost flawless semantic analysis... See also https://issues.dlang.org/show_bug.cgi?id=13925* When insertion point is inside variable or type name, highlight usages.Hopefully possible soon, see "Colorize type names".* For Visual D projects, include option to compile/link in single step.What's wrong with the "General->Compilation" option?* Automatically include modules in the current project as candidates for completion - I seem to have to add my project folders to Visual D Settings > DMD Directories > Import pathsYou should not have to add that to a global option. If your source files are not in the same folder as the project file, you might have to add the source folder to the project import paths.* Colourise type names and UDAs in editor.This is currently work in progress.See comment about tooltips above.* Ctrl-click for "Go to definition".I'll have to investigate how a language service is supposed to support that.* When user declares variables, suggest possible names based on type - eg, a variable of type "FontFaceReference" pops up a list including "fontFaceReference", "fontFace" and "reference".Interesting gimmick.* Fade out unused imports.Again, good semantic analysis is needed. See also https://issues.dlang.org/show_bug.cgi?id=13913Hope this is useful.It is, thanks again. I'll try to get 0.48.0 out of the door before starting to work on new stuff. Do you still have trouble with the beta with respect to crashes (probably due to static foreach)? Can you provide a test case?
Oct 22 2018
On Monday, 22 October 2018 at 17:50:04 UTC, Rainer Schuetze wrote:I was considering integrating dfmt at some point but it seems formatting just a selection doesn't work too well with it.I was able to do some decent (at least, from I've tested it seemed decent) selection formatting with dfmt. I don't know how formatting is handled in Visual Studio, but if it's similar to VSCode (which is basically just text replacement), then it might be possible to do the same. I simply do a diff between the code before and after formatting, to extract the portions of code that have actually changed, and then I only apply the changes affecting the selected zone of text. It's certainly not the most efficient way to do it, as it still requires formatting the whole file in the background, but it works.
Oct 22 2018
On 22/10/2018 22:58, Laurent Tréguier wrote:On Monday, 22 October 2018 at 17:50:04 UTC, Rainer Schuetze wrote:Thanks for the hint. I guess the diff only works if the rest of the code is already formatted according to the dfmt rules? Visual D only changes indentation so far, no reflow with insertion or removal of line breaks. IMO all reformatting tools produce strange results, including clang-format, so I usually avoid these. I'm still on the fence whether an integration of dfmt would be a good thing...I was considering integrating dfmt at some point but it seems formatting just a selection doesn't work too well with it.I was able to do some decent (at least, from I've tested it seemed decent) selection formatting with dfmt. I don't know how formatting is handled in Visual Studio, but if it's similar to VSCode (which is basically just text replacement), then it might be possible to do the same. I simply do a diff between the code before and after formatting, to extract the portions of code that have actually changed, and then I only apply the changes affecting the selected zone of text. It's certainly not the most efficient way to do it, as it still requires formatting the whole file in the background, but it works.
Oct 23 2018
On Wednesday, 24 October 2018 at 06:59:39 UTC, Rainer Schuetze wrote:Thanks for the hint. I guess the diff only works if the rest of the code is already formatted according to the dfmt rules?No, it works even if the rest of the code isn't properly formatted. This is why I'm using diffs: the extension knows what to change, and where, but all of the changes are independent, so you can apply whichever you want regardless of the rest to format a specific region of the code only.Visual D only changes indentation so far, no reflow with insertion or removal of line breaks. IMO all reformatting tools produce strange results, including clang-format, so I usually avoid these. I'm still on the fence whether an integration of dfmt would be a good thing...That's for sure, there are a lot of weird results with dfmt (https://github.com/dlang-community/dfmt/issues/254 comes to my mind). It could be added as an option in Visual D's settings, while keeping the current re-indentation as the default formatting action.
Oct 24 2018
On Monday, 22 October 2018 at 17:50:04 UTC, Rainer Schuetze wrote:No - inside a class, if you type "override" then ctrl-space, it shows a list of overridable functions. Choose one and it outputs a function stub, but the generated body is the same indent level as the declaration, e.g.: override protected void myFunction() { super.myFunction(); <- should be indented one level further }* Indent function bodies correctly when generating overrides.I guess you mean indentation if "override" is on the line before the function declaration?Funny, I can't reproduce this problem any more.* Indenting for enum members is sometimes too much.Can you provide an example?I haven't found a way to format tooltips better than just plain text. What you see is more or less how it is written in the source code.coloured text in tooltips. Not essential obviously, but would be nice.What's wrong with the "General->Compilation" option?Sorry, I meant in mixed Visual D/C++ projects - unless I'm wrong, all the current options there seem to add -c to the command line.OK, I somehow overlooked that option.* Automatically include modules in the current project as candidates for completion - I seem to have to add my project folders to Visual D Settings > DMD Directories > Import pathsYou should not have to add that to a global option. If your source files are not in the same folder as the project file, you might have to add the source folder to the project import paths.the ctrl key is pressed it underlines the text under the cursor, making it clickable like a hyperlink, allowing you to navigate to the definition.* Ctrl-click for "Go to definition".I'll have to investigate how a language service is supposed to support that.Yes - like most of the things I've listed, it's not essential, experience.* When user declares variables, suggest possible names based on type - eg, a variable of type "FontFaceReference" pops up a list including "fontFaceReference", "fontFace" and "reference".Interesting gimmick.Do you still have trouble with the beta with respect to crashes (probably due to static foreach)?No crashing here, and static foreach works fine for me - perhaps that was another user?
Oct 22 2018
On 22/10/2018 23:15, John Chapman wrote:On Monday, 22 October 2018 at 17:50:04 UTC, Rainer Schuetze wrote:Ah, ok. That's a completion containing newlines that need to be indented. Should not be difficult to fix.No - inside a class, if you type "override" then ctrl-space, it shows a list of overridable functions. Choose one and it outputs a function stub, but the generated body is the same indent level as the declaration, e.g.: override protected void myFunction() { super.myFunction(); <- should be indented one level further }* Indent function bodies correctly when generating overrides.I guess you mean indentation if "override" is on the line before the function declaration?don't use the usual VS services. C++ doesn't have these and is similar to Visual D.Funny, I can't reproduce this problem any more.* Indenting for enum members is sometimes too much.Can you provide an example?I haven't found a way to format tooltips better than just plain text. What you see is more or less how it is written in the source code.text in tooltips. Not essential obviously, but would be nice.That's how the VC projects work. There is not a big difference any way, a single step "compile and link" also calls the linker internally.What's wrong with the "General->Compilation" option?Sorry, I meant in mixed Visual D/C++ projects - unless I'm wrong, all the current options there seem to add -c to the command line.There seems to be a VS extension that used to do that until Microsoft integrated it with VS2017 15.6.ctrl key is pressed it underlines the text under the cursor, making it clickable like a hyperlink, allowing you to navigate to the definition.* Ctrl-click for "Go to definition".I'll have to investigate how a language service is supposed to support that.Ah sorry, confused that with https://forum.dlang.org/post/xayhoysgafpgiflomaes forum.dlang.orgDo you still have trouble with the beta with respect to crashes (probably due to static foreach)?No crashing here, and static foreach works fine for me - perhaps that was another user?
Oct 23 2018
On Wednesday, 24 October 2018 at 06:52:04 UTC, Rainer Schuetze wrote:I installed it at the weekend on VS2017 15.8 and it actually works great (with Peek turned off), although it's no longer supported. I've hit another issue: no completion list is shown after typing a storage class like "static", "final" or "const" before a member declaration - eg: class MyClass { final Obj| <- oops, no suggestions!If the ctrl key is pressed it underlines the text under the cursor, making it clickable like a hyperlink, allowing you to navigate to the definition.There seems to be a VS extension that used to do that until Microsoft integrated it with VS2017 15.6.
Oct 24 2018
On Monday, 22 October 2018 at 17:50:04 UTC, Rainer Schuetze wrote:To reproduced this, try declaring an unnamed enum with a protection attribute. private enum { first, | <- cursor is not flush with first member }* Indenting for enum members is sometimes too much.Can you provide an example?
Oct 23 2018
On 21/10/2018 12:11, John Chapman wrote:Rainer, you may have a lot of these on your to-do list, but I've been noting some of the minor issues I've come across using Visual D and it might be useful for future releases. Fixes: * The Intellisense list for __traits needs updating inline with the spec. * Remove obsolete "classinfo" from completion list. * Add "typeof" keyword to completion list. * Show completion list when typing UDAs. * Support new contract expressions (and upcoming mixin tuple syntax). * Indent function bodies correctly when generating overrides. * Indenting for enum members is sometimes too much. * Tooltips on token-string literals adds a lot of extra spacing between symbols. * Tooltips that show documentation can have excessive line breaks. * Tooltips on variables repeat attributes - eg, "private int length;" produces "private private(int) [parent].length" instead of perhaps "(variable) private int [parent].length". * Remove duplicated/disabled entries for "New filter"/"New folder" in Solution Explorer > context menu > Add. * Fix Visual D Search text boxes and buttons for high DPI displays. Suggestions: * Add option to not indent switch case labels. * Add refactoring/renaming support. * When insertion point is inside variable or type name, highlight usages. * For Visual D projects, include option to compile/link in single step. * Automatically include modules in the current project as candidates for completion - I seem to have to add my project folders to Visual D Settings > DMD Directories > Import paths * Colourise type names and UDAs in editor. * Ctrl-click for "Go to definition". * When user declares variables, suggest possible names based on type - eg, a variable of type "FontFaceReference" pops up a list including "fontFaceReference", "fontFace" and "reference". * Fade out unused imports. Hope this is useful.I have added most of these here: https://issues.dlang.org/show_bug.cgi?id=19353 - 19359
Nov 03 2018
On Saturday, 3 November 2018 at 09:32:17 UTC, Rainer Schuetze wrote:I have added most of these here: https://issues.dlang.org/show_bug.cgi?id=19353 - 19359Thanks - I didn't know VisualD bugs could be reported there too. I will do so in future.
Nov 03 2018