Re: [code] How to move from post_init.lua ?

From: Robert Gieseke <>
Date: Wed, 8 Mar 2017 16:59:20 +0100

Hi Pedro,

I think that's the only way in TA9, as per the docs:

Language Module Handling Changes

Textadept 9 no longer auto-loads a post_init.lua in language modules.
Instead, it must be loaded manually from an events.LEXER_LOADED event.
For example:

events.connect(events.LEXER_LOADED, function()
  if lang == 'ansi_c' then require('ansi_c.extras') end

will load a ~/.textadept/modules/ansi_c/extras.lua “sub-module” for C
files. Keep in mind that Lua’s require() function will only execute
module code once.

If you have a number of post_init.lua files that you want Textadept 9 to
make use of, you can put the following in your ~/.textadept/init.lua:

events.connect(events.LEXER_LOADED, function(lexer)
  if lfs.attributes(_USERHOME..'/modules/'..lexer..'/post_init.lua') then


Am 08/03/17 um 15:54 schrieb Pedro Andres Aranda Gutierrez:
> Hi,
> I have a couple of customizations for existing modules. Currently I have
> them in post_init.lua files in my .textadept/modules tree using a hack
> from the WIKI in my .textadept/init.lua to load them. What would be the
> 'proper way' to load my customizations?
> /PA
> --
> Fragen sind nicht da um beantwortet zu werden,
> Fragen sind da um gestellet zu werden
> Georg Kreisler

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 08 Mar 2017 - 10:59:20 EST

This archive was generated by hypermail 2.2.0 : Thu 09 Mar 2017 - 06:32:14 EST