Thread overview
Short demo of DCD
Aug 18, 2013
Brian Schott
Aug 18, 2013
John Colvin
Aug 18, 2013
Brian Schott
Aug 30, 2013
Bruno Medeiros
Aug 30, 2013
Brian Schott
Sep 04, 2013
Vova
Sep 05, 2013
Øivind
Sep 17, 2013
Dejan Lekic
Sep 17, 2013
Jacob Carlborg
August 18, 2013
http://www.youtube.com/watch?v=Vo2POmn2_9U

DCD is an autocompletion client/server for D. It is designed to be usable by text editors and IDEs. It's still under development at Github: https://github.com/Hackerpilot/DCD

The reference implementation of an editor integration is for Textadept. Modules for Emacs, Vim, and Kate/KDevelop are under development by various members of the D community. Pull requests for other editors are welcome.
August 18, 2013
On Sunday, 18 August 2013 at 10:15:49 UTC, Brian Schott wrote:
> http://www.youtube.com/watch?v=Vo2POmn2_9U
>
> DCD is an autocompletion client/server for D. It is designed to be usable by text editors and IDEs. It's still under development at Github: https://github.com/Hackerpilot/DCD
>
> The reference implementation of an editor integration is for Textadept. Modules for Emacs, Vim, and Kate/KDevelop are under development by various members of the D community. Pull requests for other editors are welcome.

I decided to give it a try, following the instructions in the textadept folder, but quickly came unstuck with lua errors and some form of endless loop in textadept.

What I did:
built dcd
installed textadept 6.6
copied DCD/modules/dmd/dcd.lua to ~/.textadept/modules/dmd/dcd.lua
created new ~/.textadept/modules/dmd/init.lua with content:

_M.dcd = require "dmd.dcd"

events.connect(events.CHAR_ADDED, function(ch)
    _M.dcd.autocomplete(ch)
end)

started the server
started textadept
saved a .d file
got errors:
/opt/textadept/modules/textadept/menu.lua:365: attempt to index field '?' (a boolean value)
/opt/textadept/modules/textadept/mime_types.lua:97: bad argument #1 to '__index' (this buffer is not the current one)

any activity in the code window causes a repeat of the 1st error. file->close opens a duplicate code window (WFT?) and file->closeall starts an infinite loop of opening and closing windows.
August 18, 2013
I just checked in an example init.lua. I think that my directions weren't clear enough for someone who is not familiar with TA scripting. Give it a try now.
August 30, 2013
On 18/08/2013 11:15, Brian Schott wrote:
> http://www.youtube.com/watch?v=Vo2POmn2_9U
>
> DCD is an autocompletion client/server for D. It is designed to be
> usable by text editors and IDEs. It's still under development at Github:
> https://github.com/Hackerpilot/DCD
>
> The reference implementation of an editor integration is for Textadept.
> Modules for Emacs, Vim, and Kate/KDevelop are under development by
> various members of the D community. Pull requests for other editors are
> welcome.

Interesting project. Out of curiosity, how did you implement the parser? Did you re-use any existing one?

-- 
Bruno Medeiros - Software Engineer
August 30, 2013
On Friday, 30 August 2013 at 17:53:12 UTC, Bruno Medeiros wrote:
> On 18/08/2013 11:15, Brian Schott wrote:
>> http://www.youtube.com/watch?v=Vo2POmn2_9U
>>
>> DCD is an autocompletion client/server for D. It is designed to be
>> usable by text editors and IDEs. It's still under development at Github:
>> https://github.com/Hackerpilot/DCD
>>
>> The reference implementation of an editor integration is for Textadept.
>> Modules for Emacs, Vim, and Kate/KDevelop are under development by
>> various members of the D community. Pull requests for other editors are
>> welcome.
>
> Interesting project. Out of curiosity, how did you implement the parser? Did you re-use any existing one?

It's hand-written and located here:
https://github.com/Hackerpilot/Dscanner/tree/master/stdx/d

The grammar I created while implementing the parser is here:
https://github.com/Hackerpilot/DGrammar/blob/master/D.g4

That grammar is more accurate than the language specification on the  dlang website. I kept track of the language specification problems that I found with this bug: http://d.puremagic.com/issues/show_bug.cgi?id=10233
September 04, 2013
On Sunday, 18 August 2013 at 10:15:49 UTC, Brian Schott wrote:
> http://www.youtube.com/watch?v=Vo2POmn2_9U
>
> DCD is an autocompletion client/server for D. It is designed to be usable by text editors and IDEs. It's still under development at Github: https://github.com/Hackerpilot/DCD
>
> The reference implementation of an editor integration is for Textadept. Modules for Emacs, Vim, and Kate/KDevelop are under development by various members of the D community. Pull requests for other editors are welcome.

Thats awesome, as someone who came from Go this can give huge
boost to IDEs.
September 05, 2013
On Sunday, 18 August 2013 at 10:15:49 UTC, Brian Schott wrote:
> http://www.youtube.com/watch?v=Vo2POmn2_9U


Very nice! How far along is the emacs version? What are the missing things you mention in the readme?
September 17, 2013
On Sunday, 18 August 2013 at 10:15:49 UTC, Brian Schott wrote:
> http://www.youtube.com/watch?v=Vo2POmn2_9U
>
> DCD is an autocompletion client/server for D. It is designed to be usable by text editors and IDEs. It's still under development at Github: https://github.com/Hackerpilot/DCD
>
> The reference implementation of an editor integration is for Textadept. Modules for Emacs, Vim, and Kate/KDevelop are under development by various members of the D community. Pull requests for other editors are welcome.

So I assume we have to save any changes in the file before we "ask" DCD for completion, right?
September 17, 2013
On Tuesday, 17 September 2013 at 08:26:57 UTC, Dejan Lekic wrote:

> So I assume we have to save any changes in the file before we "ask" DCD for completion, right?

No, not necessarily. DCD can take input from stdin. So if your editor can provide the plugin with the content of the unsaved file it should be fine. TextMate can do that, for example.

--
/Jacob Carlborg