-
Notifications
You must be signed in to change notification settings - Fork 39
modules common
mitchell edited this page Sep 18, 2020
·
1 revision
Create a file ~/.textadept/modules/common/init.lua with the following in it:
local lfs = require 'lfs'
for filename in lfs.dir(_USERHOME..'/modules/common/') do
if filename:find('%.lua$') and filename ~= 'init.lua' then
require('common.'..filename:match('^(.+)%.lua$'))
end
end
Then add
require 'common'
to your ~/.textadept/init.lua
All "common" submodules that are placed in modules/common will be automatically loaded without having to add another require statement.