diff options
author | jgmdev <jgmdev@gmail.com> | 2022-05-24 19:29:50 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-05-24 19:29:50 -0400 |
commit | 35e947d1933613bb0b5a1488bf0fa4587f98ef7d (patch) | |
tree | 07d2515f44db03b1e865f6aef6adfd12b118890b /plugins/autowrap.lua | |
parent | c1f3671e2a8defbc67d1e77c72d5866f2825cdb5 (diff) | |
download | lite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.tar.gz lite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.zip |
added config_spec and other plugin compatibility fixes.
Diffstat (limited to 'plugins/autowrap.lua')
-rw-r--r-- | plugins/autowrap.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua index fee001b..238053d 100644 --- a/plugins/autowrap.lua +++ b/plugins/autowrap.lua @@ -7,7 +7,25 @@ local DocView = require "core.docview" config.plugins.autowrap = common.merge({ enable = false, - files = { "%.md$", "%.txt$" } + files = { "%.md$", "%.txt$" }, + -- The config specification used by the settings gui + config_spec = { + name = "Auto Wrap", + { + label = "Enable", + description = "Activates text auto wrapping by default.", + path = "enable", + type = "toggle", + default = false + }, + { + label = "Files", + description = "List of Lua patterns matching files to auto wrap.", + path = "files", + type = "list_strings", + default = { "%.md$", "%.txt$" }, + } + } }, config.plugins.autowrap) |