aboutsummaryrefslogtreecommitdiff
path: root/plugins/autowrap.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/autowrap.lua
parentfb647f8f0d972e85ac323b12eb65edf9c56b48cb (diff)
downloadlite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.tar.gz
lite-xl-plugins-466798679e7a2889622a491c776530c06668ca9f.zip
Namespaced plugin configs.
Diffstat (limited to 'plugins/autowrap.lua')
-rw-r--r--plugins/autowrap.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua
index 090e338..acfd37f 100644
--- a/plugins/autowrap.lua
+++ b/plugins/autowrap.lua
@@ -4,7 +4,7 @@ local config = require "core.config"
local command = require "core.command"
local DocView = require "core.docview"
-config.autowrap_files = { "%.md$", "%.txt$" }
+config.plugins.autowrap = { files = { "%.md$", "%.txt$" } }
local on_text_input = DocView.on_text_input
@@ -15,7 +15,7 @@ DocView.on_text_input = function(self, ...)
-- early-exit if the filename does not match a file type pattern
local filename = self.doc.filename or ""
local matched = false
- for _, ptn in ipairs(config.autowrap_files) do
+ for _, ptn in ipairs(config.plugins.autowrap.files) do
if filename:match(ptn) then
matched = true
break