Visual D and code navigation improvements.

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sun Mar 19 09:58:29 PDT 2017



On 18.03.2017 23:13, Random D user wrote:
> VisualD is working pretty good these days, but there's couple little
> things related the code navigation which would greatly improve the
> coding experience.
>
> 1. Jump to method list (current file)
> Similar to VisualAssist's  List methods in file
> (http://www.wholetomato.com/features/feature-navigation.asp#methods),
> DPack all members (http://www.usysware.com/dpack/CodeBrowser.aspx) or
> Visual Studio Navigate To (ctrl + ,).

There is currently "Search Symbol" based on JSON output by the compiler 
from a previous build, but it lists all symbols in the solution, not 
limited to the current file.

But I agree, having something like the navigation bar in C++ or C# would 
be nice.

> What would it take and how hard would it be to implement this in Visual D?

I hope I can find some time to investigate how integration of the 
navigation bar works.

> Basically, a list of functions and methods in the current file (hit
> alt+m and focus on the dialog) that could be interactively filtered by
> typing the start of the symbol name (scope should be ignored for the
> filter, but shown in the list (who wants to fiddle with scope when you
> just want to jump to a symbol name (quickly) in that file)).

A simple implementation could tweak the "Search symbol" dialog to just 
list symbol names from the current file.

> 2. Ctrl+space latency.
> Currently on my small to medium sized projects hitting ctrl+space
> usually works, but with a 0.5 - 1.0 second delay (with high end
> machine), so it's annoying enough that I don't use it all that much.

Usually, most of the time is spent trying to find completions using 
UFCS. You can disable this on the options page.

> I hope this could be optimized to be faster, but if there isn't any low
> hanging fruit left, maybe it could be temporally spread over longer
> period of time in order to get the latency low. For example, maybe
> ctrl+space could list symbols from current file immediately and then
> progressively expand the list as more symbols are found through
> searching imports.

I have some ideas how to allow the semantic engine to cache previous 
results, but as this engine isn't written by me (but by Alex Bothe for 
Mono-D), I only have a rough idea of the complications.

>
> 3. Bonus question about debug symbols.
> Sometimes debugging D is broken, the debugger either shows garbage
> values for the symbols (usually fixed in the next function if they're
> passed) or doesn't show them at all. Are there still missing or invalid
> debug symbols emitted by DMD?

Yes, very likely there are.

> Or is there some limitations in mago?

None I'm currently aware of, but if you have some test cases, please 
file to bugzilla.

> Lastly, I want to say thanks (Rainer S.) for creating and supporting
> Visual D.

Thanks for reporting back.


More information about the Digitalmars-d-ide mailing list