Re: [code] C++ Support

From: Mitchell <>
Date: Mon, 2 Jun 2014 16:38:28 -0400 (Eastern Daylight Time)


On Mon, 2 Jun 2014, Ryan Pusztai wrote:

> Hi Mitchell,
> On Mon, Jun 2, 2014 at 3:30 PM, Mitchell <> wrote:
>> Hi Ryan,
>> On Mon, 2 Jun 2014, Ryan Pusztai wrote:
>> Hi Mitchell,
>>> I am really struggling because there used to be a CPP module to go along
>>> with the CPP lexer and now it is gone. I have talked about this in the
>>> past
>>> and tried to use the ansi_c module as an example because it does the
>>> "things" I was looking for. Now it has significantly changed again (my cpp
>>> module on ly lasted 1 major release) and I am not experienced enough with
>>> TextAdept and it's internals to rewrite this module. My plea is for you to
>>> bring back the CPP module or make the ansi_c module load for both ansci_c
>>> and cpp lexers. I want basic autocomplete and the ability to add api files
>>> for libraries I use. I also wanted the ability to use a 'post_init.lua' to
>>> add some other utility functions to my open cpp buffers.
>> Sorry to hear the latest changes are causing you so much trouble :( When I
>> removed Adeptsense, I failed to take into consideration your use case;
>> please accept my apologies.
>> The quick fix is to simply copy *modules/ansi_c/init.lua* to
>> *~/.textadept/modules/cpp/init.lua* and replace all instances of "ansi_c"
>> with "cpp". (You can keep your existing *post_init.lua*, which should
>> remain unaffected.) By making the copy, you retain the ability to add api
>> files (via *post_init.lua*) as well as make use of ansi_c's simple
>> autocomplete capabilities via ctags. I hope this makes sense. If it's still
>> not working, send me your old module off-list and I'll help make the
>> necessary modifications for you.
> OK that sounds acceptable. But now how do I get my post_init.lua to load.
> It doesn't seem to get loaded at all. I did as you said above and simply
> copied the file and replaced the ansi_c with cpp. Now I have
> *~/.textadept/modules/cpp/init.lua* and my "post_init.lua" is located
> *~/.textadept/cpp/post_init.lua*. Do I need to do something else to make it
> load this file automatically? I added a "ui.print( "Loading CPP
> post_init.lua" )" to the top of the file and it never shows the [Message
> Buffer].

Your *post_init.lua* should be in
*~/.textadept/modules/cpp/post_init.lua*. (Note the "modules"
subdirectory, which matches Textadept's module directory structure.) Once
you make that change, your print statement should fire.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 02 Jun 2014 - 16:38:28 EDT

This archive was generated by hypermail 2.2.0 : Tue 03 Jun 2014 - 06:52:17 EDT