aboutsummaryrefslogtreecommitdiff
path: root/plugins/lfautoinsert.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2021-07-13 10:47:39 -0400
committerAdam Harrison <adamdharrison@gmail.com>2021-08-17 09:52:24 -0400
commit466798679e7a2889622a491c776530c06668ca9f (patch)
treec0ebb8bdc0cc940f7cce465899a126f0f79a04ba /plugins/lfautoinsert.lua
parentfb647f8f0d972e85ac323b12eb65edf9c56b48cb (diff)
downloadlite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.tar.gz
lite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.zip
Namespaced plugin configs.
Diffstat (limited to 'plugins/lfautoinsert.lua')
-rw-r--r--plugins/lfautoinsert.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua
index bbfb60c..3a8369e 100644
--- a/plugins/lfautoinsert.lua
+++ b/plugins/lfautoinsert.lua
@@ -5,7 +5,7 @@ local common = require "core.common"
local config = require "core.config"
local keymap = require "core.keymap"
-config.lfautoinsert_map = {
+config.plugins.lfautoinsert = { map = {
["{%s*\n"] = "}",
["%(%s*\n"] = ")",
["%f[[]%[%s*\n"] = "]",
@@ -36,11 +36,11 @@ config.lfautoinsert_map = {
["%[%[%s*\n"] = "]]"
}
},
-}
+} }
local function get_autoinsert_map(filename)
local map = {}
- for pattern, closing in pairs(config.lfautoinsert_map) do
+ for pattern, closing in pairs(config.plugins.lfautoinsert.map) do
if type(closing) == "table" then
if common.match_pattern(filename, closing.file_patterns) then
for p, e in pairs(closing.map) do
@@ -101,7 +101,7 @@ keymap.add {
return {
add = function(file_patterns, map)
table.insert(
- config.lfautoinsert_map,
+ config.plugins.lfautoinsert.map,
{ file_patterns = file_patterns, map=map }
)
end