Skip to content

Lumen – A Code-Completion Plugin for the D Programming Language

Thursday, 20 February 2014 | David Herberth


I am the original author of the Lumen KTextEditor plugin and I am happy to announce, I just committed it to the Kate repository for KDE 4.13!

Lumen is just the name for a plugin providing code-completion for the D programming language in KTextEditor/Kate and KDevelop. But Lumen is just a connection between the editor and the D Completion Daemon (a server providing all the information) called  DCD. The plugin currently supports all major features of the completion server: feeding the server with import files, displaying documentation and several types of completion:

Imports:

example of lumen (imports)

Basic Completion:

example of lumen (code completion)

Completion (overloaded Function):

example of lumen (code completion)

Calltips:

example of lumen (calltips)

 

To make Lumen work you have to install DCD, unfortunately no Linux distribution has DCD packaged so far. Luckily the D community provides a remedy.

For all Debian/apt based distributions like Ubuntu and Debian of course, there is the d-apt, simply follow the instructions on how to setup the apt-repository and install DCD via apt.  For Archlinux exists an AUR Package. Everyone else has to setup DCD manually, but it’s really not hard, simply follow these instructions.

After installing DCD edit ~/.config/dcd/dcd.conf (create if it does not exist already) and add a path to your D include/import files (phobos), for me this is /usr/include/dlang/dmd (on ArchLinux), for other installations this would most likely be /usr/include/d. Furthermore Lumen will try to read a .lumenconfig in every parent folder of the currently opened D source file and add every line in this file as include path to the DCD server. Add all dependencies of your current project to this file.

Now start the completion server with dcd-server, enable the Lumen plugin in your settings and you will have code completion for the D programming language in your favorite editor!

Tags:  planet

See also: