You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mitchell edited this page Sep 18, 2020
·
1 revision
Automatic loading of modules in modules/common/
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.