DCD: Autocomplete without the IDE

Brian Schott briancschott at gmail.com
Sun Sep 15 14:41:19 PDT 2013

On Sunday, 15 September 2013 at 12:38:03 UTC, Jacob Carlborg 
> I'm thinking about adding support for this to TextMate. But as 
> soon as one adds this to an editor a bunch of new issues 
> appears, which I'm trying to figure out.
> * When to start/stop the server. I'm, at least as a start, 
> going to try and implement this as a bundle command and not a 
> plugin. A bundle command basically is a script that is run when 
> a key is pressed

I start and stop the server manually. I know that this should be 
improved, but there are a few other things that I'd like to focus 
on first.

> * How to deal with import paths? TextMate doesn't have any kind 
> of build configuration. I need to be able to specify, except 
> for the current project, the path to the standard library and 
> possibly paths for other projects. I have an idea how to do 
> this, using custom keys in the project specific settings, but 
> I'm wondering how this is solved in other editors.

Things such as the standard library location can be placed in 
$XDG_CONFIG_HOME/dcd/dcd.conf or $HOME/.config/dcd/dcd.conf on 
Linux or BSD, or dcd.conf (in the same directory as the server 
executable) on Windows. The server reads this on startup and 
caches all .d and .di files that it finds in the paths in that 

> * How to deal with multiple sessions/projects? Should I have 
> one server running per session/project? Say I have two 
> different projects, both with the symbol "foo.bar". I don't 
> want those to cause conflicts.

Symbols are filtered by the import statements that are contained 
in the text that you send to dcd-client, so there shouldn't be a 
conflict. If you have multiple foo backages each with a bar 
module, then it'll probably break.

More information about the Digitalmars-d-announce mailing list