VisualD's Intellisense not workign with gtk

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Tue Jul 11 00:16:33 PDT 2017



On 07.07.2017 19:23, FoxyBrown wrote:
> Hi, I get no intellisense with visual d when using gtk.
> 
> I use a file that imports all of gtk, like so:
> 
> 
> module gtk.All;
> 
> public import gtk.AboutDialog;
> ...
> public import gtk.WindowGroup;
> 
> then I use
> 
> import gtk = gtk.All
> 
> but when using
> 
> gtk.
> or gtk.WindowGroup.
> 
> or somegtkWidget.
> 
> no intellisense ever appears or it appears with only the basic object 
> elements.
> 
> 
> This makes it very hard to navigate through gtk as I am unfamiliar with 
> most of the nomenclature.
> 
> Is there any way to get VisualD to properly show the intellisense for 
> these objects and modules? Even if necessarily having to specify direct 
> inclusion.
> 
> If I just do
> 
> gtk.gtk.gtk.gtk.gtk.gtk.gtk....
> 
> in an empty d file it goes on and on always listing the same 
> intellisense. Changing things like gtk.gtkd.gtk.gtkd.... doesnt change 
> the results.
> 
> The intellisense listed is ByRecord, Error, Exception, File, Interface, 
> etc. I do not think they are part of gtk.

AFAICT the completion has problems with public imports in imported 
modules: they don't add any symbols. This should be fixed in 
https://github.com/dlang/visuald/releases/tag/v0.45.0-rc1


> 
> In any case, it clearly isn't working and there doesn't seem to be any 
> way to correct it. It would be nice if we could precompile intellisense 
> data from a set of modules(e.g., specify that it build an intellisense 
> database from a directory recursively... probably would be faster too). 
> Phobos, gtk, and other libraries generally do not change often enough 
> that it should work well.

If you let the compiler generate JSON data for your project (see 
language options), Visual D can add the contained symbols to the 
completion lists. You can also add precompiled JSON files (see global 
options). This doesn't use any scope information, though, so the list 
can grow enormously.

  One of the biggest issues I seem to have with
> Visual D is intellisense not really working correctly, if it works at 
> all, but this isn't a hard problem, is it?

You bet it is ;-) It needs to rebuild the compiler front end, just being 
more friendly regarding error recovery and incremental changes. Visual D 
uses dparser from the Mono-D project, which still seems the most 
extensive solution.


More information about the Digitalmars-d-ide mailing list