[txmt-dev] Integrate code completion

Jacob Carlborg doob at me.com
Sun Sep 15 14:58:22 UTC 2013


Recently a tool which does code completion for the D programming 
language was released. I'm thinking about integrating that with 
TextMate. For that I have a couple of questions.

I'm trying to figure out if I should implement it as a bundle command or 
an plugin. I'm hoping a bundle command will be sufficient, at least as a 
first step.

The tool uses a client-server architecture. It needs three things to work:

* The the file in which the code completion is triggered
* The position of the cursor, in UTF-8 code units (bytes).
* A list of directors containing include paths

A. Is this information possibly to get from a bundle command?

B. I think the user need a way to specify include paths. This is for the 
standard library and possibly other projects. Can the .tm_properties 
file be used for this?

When it comes to presenting the result for the user I would like to show 
some kind of list (like a context menu) with the result. When the user 
picks a result from the list I would like it to insert the method name 
including the parameter names making it possible to tab between 
parameters. This is just like how snippets can work.

C. Is this possible?
D. Can I include icons in the list, to indicate methods, variables and 
so on?

If necessary I can make changes both to the tool and TextMate. But I'm 
wondering what's possible without doing that first.

-- 
/Jacob Carlborg



More information about the textmate-dev mailing list