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

From: Robert Gieseke <rob.g.att.web.de>
Date: Thu, 9 Mar 2017 08:45:40 +0100

Hi Pedro,

Am 09/03/17 um 03:45 schrieb Mitchell:
> On Wed, 8 Mar 2017, Pedro Andres Aranda Gutierrez wrote:
>> I was expecting to trigger a discussion on this ;-)
>>
>> I don't know if there are other people in the same situation as me and
>> whether a thought process on whether any improvement is needed would be of
>> any benefit for the community....
>
> The idea of autoloading was a design mistake I think (and was a source of
> confusion). I have since decided that explicit loading is better, so the
> way Robert described is the way to go.

note that you could load a language module once in your init.lua and
then load your additional sub-modules:

-- Load module without waiting for a C file to be opened
require('ansi_c')
-- Extensions
require('ansi_c.extras')

Further, most extensions like keys, snippets, run commands don't 'live'
in the language module, so you can set them without putting them into a
language module or post_init file.

Maybe you don't really need post_init files ...

Hope that helps,
Robert

-- 
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 Thu 09 Mar 2017 - 02:45:40 EST

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