www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DCD: Autocomplete without the IDE

reply "Brian Schott" <briancschott gmail.com> writes:
* What is it?
DCD is a client and server program that work together to provide 
autocomplete suggestions and function call tips to almost any 
text editor that supports scripting or plugins.

* Who is it for?
People who would like autocomplete, but don't want to give up 
their favorite editor for an IDE.

* Where is it?
GitHub! https://github.com/Hackerpilot/DCD

* What does it look like?
There's a short demo video on Youtube: 
http://www.youtube.com/watch?v=Vo2POmn2_9U

* What editors does it work with?
Textadept, Kate/KDevelop, Vim, and Emacs. The Textadept 
integration script is the reference implementation.

* This sounds a lot like GoCode
It does, doesn't it?

* Does it work?
Yes and no. DCD is fairly new, and not all of the features you'd 
expect from a D autocompletion engine are present. I do feel that 
it's enough of an improvement over not having autocomplete to 
make this alpha announcement.

* Should I file bug reports in this announcement thread?
No. Add them here: 
https://github.com/Hackerpilot/DCD/issues?state=open
Sep 01 2013
next sibling parent reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
On Sunday, 1 September 2013 at 10:58:28 UTC, Brian Schott wrote:
 * What is it?
 DCD is a client and server program that work together to 
 provide autocomplete suggestions and function call tips to 
 almost any text editor that supports scripting or plugins.
Do you have any plans to support "go to definition" function? It's really useful in real life.
Sep 01 2013
parent "Brian Schott" <briancschott gmail.com> writes:
On Sunday, 1 September 2013 at 13:57:58 UTC, ilya-stromberg wrote:
 Do you have any plans to support "go to definition" function? 
 It's really useful in real life.
Yes. I just filed it as issue 26. https://github.com/Hackerpilot/DCD/issues/26
Sep 01 2013
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-09-01 12:58, Brian Schott wrote:
 * What is it?
 DCD is a client and server program that work together to provide
 autocomplete suggestions and function call tips to almost any text
 editor that supports scripting or plugins.
* Anything new since you last time you announced it? * How does one best handle starting and stopping of the server? -- /Jacob Carlborg
Sep 01 2013
parent reply "Brian Schott" <briancschott gmail.com> writes:
On Monday, 2 September 2013 at 06:30:48 UTC, Jacob Carlborg wrote:
 * Anything new since you last time you announced it?
I'm pretty sure this is the first thread in .announce. Somebody else created a thread about the Kate plugin about a week ago though.
 * How does one best handle starting and stopping of the server?
"dcd-client --shutdown" will shut down the server.
Sep 02 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-09-02 09:07, Brian Schott wrote:

 "dcd-client --shutdown" will shut down the server.
Well, I'm mean from within the text editor. Is the user expected to run this when quitting the editor? -- /Jacob Carlborg
Sep 02 2013
parent reply "Brian Schott" <briancschott gmail.com> writes:
On Monday, 2 September 2013 at 14:59:10 UTC, Jacob Carlborg wrote:
 On 2013-09-02 09:07, Brian Schott wrote:

 "dcd-client --shutdown" will shut down the server.
Well, I'm mean from within the text editor. Is the user expected to run this when quitting the editor?
That's something that the editor plugin can call on shutdown. DCD pretty much requires that the editor support scripting.
Sep 02 2013
next sibling parent reply Rory McGuire <rjmcguire gmail.com> writes:
Do you ever use Sublime Text 2/3? Any plans to support integration with it?

Seriously awesome work. I've wanted to make this since I saw gocode,  but I
couldn't figure out how to get at the ast in dmd.
On 3 Sep 2013 00:25, "Brian Schott" <briancschott gmail.com> wrote:

 On Monday, 2 September 2013 at 14:59:10 UTC, Jacob Carlborg wrote:

 On 2013-09-02 09:07, Brian Schott wrote:

  "dcd-client --shutdown" will shut down the server.

 Well, I'm mean from within the text editor. Is the user expected to run
 this when quitting the editor?
That's something that the editor plugin can call on shutdown. DCD pretty much requires that the editor support scripting.
Sep 02 2013
parent reply "yaz" <yazan.dabain gmail.com> writes:
On Tuesday, 3 September 2013 at 04:54:24 UTC, Rory McGuire wrote:
 Do you ever use Sublime Text 2/3? Any plans to support 
 integration with it?

 Seriously awesome work. I've wanted to make this since I saw 
 gocode,  but I
 couldn't figure out how to get at the ast in dmd.
 On 3 Sep 2013 00:25, "Brian Schott" <briancschott gmail.com> 
 wrote:
I'm currently experimenting a bit with Sublime Text and DCD. I might hopefully get an alpha quality plugin that just works in a week. No promises made.
Sep 02 2013
next sibling parent reply Rory McGuire <rjmcguire gmail.com> writes:
Nice. Would you mind keeping the default key bindings that gosublime uses?
On 3 Sep 2013 07:55, "yaz" <yazan.dabain gmail.com> wrote:

 On Tuesday, 3 September 2013 at 04:54:24 UTC, Rory McGuire wrote:

 Do you ever use Sublime Text 2/3? Any plans to support integration with
 it?

 Seriously awesome work. I've wanted to make this since I saw gocode,  but
 I
 couldn't figure out how to get at the ast in dmd.
 On 3 Sep 2013 00:25, "Brian Schott" <briancschott gmail.com> wrote:
I'm currently experimenting a bit with Sublime Text and DCD. I might hopefully get an alpha quality plugin that just works in a week. No promises made.
Sep 02 2013
parent "yaz" <yazan.dabain gmail.com> writes:
On Tuesday, 3 September 2013 at 06:31:55 UTC, Rory McGuire wrote:
 Nice. Would you mind keeping the default key bindings that 
 gosublime uses?
 On 3 Sep 2013 07:55, "yaz" <yazan.dabain gmail.com> wrote:
I'll be focusing on getting it to work first of all. Later on, there won't be a problem with that.
Sep 03 2013
prev sibling parent reply "Ludovit Lucenic" <llucenic gmail.com> writes:
On Tuesday, 3 September 2013 at 05:50:58 UTC, yaz wrote:
 On Tuesday, 3 September 2013 at 04:54:24 UTC, Rory McGuire 
 wrote:
 Do you ever use Sublime Text 2/3? Any plans to support 
 integration with it?

 Seriously awesome work. I've wanted to make this since I saw 
 gocode,  but I
 couldn't figure out how to get at the ast in dmd.
 On 3 Sep 2013 00:25, "Brian Schott" <briancschott gmail.com> 
 wrote:
I'm currently experimenting a bit with Sublime Text and DCD. I might hopefully get an alpha quality plugin that just works in a week. No promises made.
Hello yaz, how far did you get with Sublime Text autocomplete support for D?
Sep 09 2015
parent "Brian Schott" <briancschott gmail.com> writes:
On Wednesday, 9 September 2015 at 07:04:27 UTC, Ludovit Lucenic 
wrote:
 Hello yaz, how far did you get with Sublime Text autocomplete 
 support for D?
https://github.com/yazd/DKit/ There's a link to this on DCD's wiki.
Sep 09 2015
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-09-03 00:20, Brian Schott wrote:

 That's something that the editor plugin can call on shutdown. DCD pretty
 much requires that the editor support scripting.
I was looking in to adding this to TextMate. But the easiest solution would most likely be using bundles. In TextMate that's basically a script that gets executed when a hotkey is pressed. I mean, I can't really start and stop the sever each time the users press that key. TextMate supports plugins as well, kind of. But it's quite cumbersome to write. I hasn't a real API, one uses method swizzling and observers to implement a plugin. It's a lot easier now when TextMate 2 is open source. It also seems a bit unnecessary to have the server running as soon as the user opens TextMate. He/she might not even use the editor for D this time. -- /Jacob Carlborg
Sep 02 2013
parent reply David <d dav1d.de> writes:
Am 03.09.2013 08:46, schrieb Jacob Carlborg:
 On 2013-09-03 00:20, Brian Schott wrote:
 
 That's something that the editor plugin can call on shutdown. DCD pretty
 much requires that the editor support scripting.
I was looking in to adding this to TextMate. But the easiest solution would most likely be using bundles. In TextMate that's basically a script that gets executed when a hotkey is pressed. I mean, I can't really start and stop the sever each time the users press that key. TextMate supports plugins as well, kind of. But it's quite cumbersome to write. I hasn't a real API, one uses method swizzling and observers to implement a plugin. It's a lot easier now when TextMate 2 is open source. It also seems a bit unnecessary to have the server running as soon as the user opens TextMate. He/she might not even use the editor for D this time.
I wrote the Kate/Kwrite/Kdevelop Plugin. I recommend you to let the server running all the time anyways (start it with X e.g.), since processing phobos alone takes quite some time. If you power up the editor you don't wanna wait a few minutes until DCD is done and can answer the requests. Also, if you start multiple sessions, you want only one server running (the K* Plugin won't start multiple servers anyways because it has a fixed port).
Sep 07 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-09-07 13:23, David wrote:

 I wrote the Kate/Kwrite/Kdevelop Plugin. I recommend you to let the
 server running all the time anyways (start it with X e.g.), since
 processing phobos alone takes quite some time. If you power up the
 editor you don't wanna wait a few minutes until DCD is done and can
 answer the requests. Also, if you start multiple sessions, you want only
 one server running (the K* Plugin won't start multiple servers anyways
 because it has a fixed port).
Ok. As long as there won't be any conflicts or extra processing of files not used. -- /Jacob Carlborg
Sep 08 2013
prev sibling parent Faux Amis <faux amis.com> writes:
On 3-9-2013 00:20, Brian Schott wrote:
 On Monday, 2 September 2013 at 14:59:10 UTC, Jacob Carlborg wrote:
 On 2013-09-02 09:07, Brian Schott wrote:

 "dcd-client --shutdown" will shut down the server.
Well, I'm mean from within the text editor. Is the user expected to run this when quitting the editor?
That's something that the editor plugin can call on shutdown. DCD pretty much requires that the editor support scripting.
Let me plug in Notepad++ plugins :) http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Development
Sep 03 2013
prev sibling next sibling parent reply =?UTF-8?B?IkFuZHLDqSI=?= <andre andre.to> writes:
I just tried it with the Kate and it's working like a charm! All
contributors keep up the good work :-) I really like the
client/server approach because it enables everyone to use his or
hers favourite editor.

Is there a blog or changelog which allows to follow the further
progress?

Cheers
André

On Sunday, 1 September 2013 at 10:58:28 UTC, Brian Schott wrote:
 * What is it?
 DCD is a client and server program that work together to 
 provide autocomplete suggestions and function call tips to 
 almost any text editor that supports scripting or plugins.

 * Who is it for?
 People who would like autocomplete, but don't want to give up 
 their favorite editor for an IDE.

 * Where is it?
 GitHub! https://github.com/Hackerpilot/DCD

 * What does it look like?
 There's a short demo video on Youtube: 
 http://www.youtube.com/watch?v=Vo2POmn2_9U

 * What editors does it work with?
 Textadept, Kate/KDevelop, Vim, and Emacs. The Textadept 
 integration script is the reference implementation.

 * This sounds a lot like GoCode
 It does, doesn't it?

 * Does it work?
 Yes and no. DCD is fairly new, and not all of the features 
 you'd expect from a D autocompletion engine are present. I do 
 feel that it's enough of an improvement over not having 
 autocomplete to make this alpha announcement.

 * Should I file bug reports in this announcement thread?
 No. Add them here: 
 https://github.com/Hackerpilot/DCD/issues?state=open
Sep 10 2013
parent "Kiith-Sa" <kiithsacmp gmail.com> writes:
On Tuesday, 10 September 2013 at 16:15:55 UTC, André wrote:
 I just tried it with the Kate and it's working like a charm! All
 contributors keep up the good work :-) I really like the
 client/server approach because it enables everyone to use his or
 hers favourite editor.

 Is there a blog or changelog which allows to follow the further
 progress?

 Cheers
 André

 On Sunday, 1 September 2013 at 10:58:28 UTC, Brian Schott wrote:
 * What is it?
 DCD is a client and server program that work together to 
 provide autocomplete suggestions and function call tips to 
 almost any text editor that supports scripting or plugins.

 * Who is it for?
 People who would like autocomplete, but don't want to give up 
 their favorite editor for an IDE.

 * Where is it?
 GitHub! https://github.com/Hackerpilot/DCD

 * What does it look like?
 There's a short demo video on Youtube: 
 http://www.youtube.com/watch?v=Vo2POmn2_9U

 * What editors does it work with?
 Textadept, Kate/KDevelop, Vim, and Emacs. The Textadept 
 integration script is the reference implementation.

 * This sounds a lot like GoCode
 It does, doesn't it?

 * Does it work?
 Yes and no. DCD is fairly new, and not all of the features 
 you'd expect from a D autocompletion engine are present. I do 
 feel that it's enough of an improvement over not having 
 autocomplete to make this alpha announcement.

 * Should I file bug reports in this announcement thread?
 No. Add them here: 
 https://github.com/Hackerpilot/DCD/issues?state=open
https://github.com/Hackerpilot/DCD/commits/master
Sep 10 2013
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-09-01 12:58, Brian Schott wrote:
 * What is it?
 DCD is a client and server program that work together to provide
 autocomplete suggestions and function call tips to almost any text
 editor that supports scripting or plugins.
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 * 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. * 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. -- /Jacob Carlborg
Sep 15 2013
parent reply "Brian Schott" <briancschott gmail.com> writes:
On Sunday, 15 September 2013 at 12:38:03 UTC, Jacob Carlborg 
wrote:
 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 file.
 * 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.
Sep 15 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-09-15 23:41, Brian Schott wrote:

 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.
Ok, I can probably add this to a menu.
 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 file.
Ok, I see. But a user needs to be able use different compilers for different projects. I'll see if I can use the project specific settings and fall back on dcd.conf.
 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.
So ideally one server per session/project. That won't conflict, right? I can just use different ports? -- /Jacob Carlborg
Sep 15 2013
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 9/1/2013 3:58 AM, Brian Schott wrote:
 * What does it look like?
 There's a short demo video on Youtube:
http://www.youtube.com/watch?v=Vo2POmn2_9U
Looks very nice!
Sep 15 2013