Re: [code] I need help adding a language-specific snippet

From: Mitchell <>
Date: Tue, 7 May 2013 09:02:09 -0400 (Eastern Daylight Time)


On Tue, 7 May 2013, Russell Dickenson wrote:

> Mitchell,
> [snip]
> Before advancing too far I need to have one point clarified: the use of
> "post_init.lua". When I was first trying to enable the XML-specific
> snippet, I thought that I should be using "post_init.lua" but that
> wasn't working so instead I switched to "init.lua". Can you please
> clarify if I have the right configuration according to my goals? In
> future I intend enabling buffer-specific properties, such as word-wrap
> etc, so I want to be sure I am defining these in the right place.

Sure. When you want to customize the behavior for specific languages, you
would normally create a language specific module in your
*~/.textadept/modules/[lang]/* folder. Such a module needs to have an
*init.lua* file (this is standard Lua practice) that is run when Textadept
loads the module. Even if that directory exists, Textadept will not
recognize it as a module unless it has an *init.lua* in it. Only when such
a module is detected does Textadept then run a *post_init.lua* file. In
your case, no XML module was detected so your *post_init.lua* file was
never run.

That said, I saw you were interested in someone's XML module. If you were
to download it and put it in your *~/.textadept/modules/xml/* folder, and
if you had a *post_init.lua* file with that snippet, then it would load
properly. However, it seems that you did not download the module and your
xml/ directory was empty, hence why you needed *init.lua* instead of

I hope this helps.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 07 May 2013 - 09:02:09 EDT

This archive was generated by hypermail 2.2.0 : Wed 08 May 2013 - 06:53:21 EDT