Re: [code] C++ Support

From: Ryan Pusztai <rpusztai.att.gmail.com>
Date: Mon, 2 Jun 2014 16:32:11 -0400

Hi Mitchell,

On Mon, Jun 2, 2014 at 3:30 PM, Mitchell <m.att.foicica.com> 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].

 I know this sounds like bitching and it really is, but I love this editor
>> and the direction you are going is the direction I want to go. I am just
>> struggling with how the changes impact my .textadept directory and how
>> much
>> work it is to keep them up to date with such a fluid API. It makes me
>> think
>> twice about not updating to the latest TextAdept.
>>
>
> I understand what you mean, and I'm sorry it happened. Believe me that for
> every change I make, I do my best to think about how it affects existing
> users. For this release I was quite confident that removing Adeptsense
> wouldn't cause any problems, but as I mentioned, I failed to think of your
> case.
>
> Most API changes are additions. I try to minimize removals, and do my best
> to restrict them only to things I judge to be unused by all. Any
> modifications (such as `autocomplete_word()` that you brought up in your
> earlier e-mail) are taken seriously and only made when I deem it necessary
> for the "greater good". In this case, the new autocompleter functionality
> superceded `autocomplete_word()`.

Thanks I feel better. Plus I think the autocompleter is a better addition,
just had a lot of churn on my ~/.textadept directory. I guess I do a lot of
customizing, but that is why I think Textadept is awesome because I can
make it what I think is best.

> I you know I mean this in the best intention. I just feel like others
>> might be feeling the same way. Thoughts? Or should I just shut up and be
>> happy, which I will gladly do.
>>
>
> Thanks for your feedback, and I encourage you to speak your mind in the
> future. This release was difficult for me because I really needed to remove
> some cruft and clean things up before things got out of hand, but at the
> same time I was afraid of causing problems.
>

Thanks for being open.

> I will take this as a learning experience for me. I hope you will believe
> me when I say that this will not happen in a minor release again (7.x). I
> don't ever want you to worry about upgrading in that case.

Glad to know. Thanks again for being understanding and helping me out.

> P.S. I would like to create api files for some big libraries (e.g. Boost,
>> wxWidgets) I use, but I could not figure out how to generate the api files
>> using ctags. Can you give me any pointers. I saw you generate some, but it
>> looks like you used Lua to write the parser and C++ is a bit too
>> complicated to get correct when ctags is arround. I hope this makes sense.
>>
>
> ctags cannot generate api files. I believe I produced the ANSI C module's
> C and Lua api files by hand. The Lua module's api file is generated by the
> LuaDoc tool, which specializes in parsing documentation out of Lua source
> files. In your case you'd need a tool to parse out Boost/wxWidgets
> documentation into the API file format.
>

O...K... :)

--
Regards,
Ryan
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 02 Jun 2014 - 16:32:11 EDT

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