aboutsummaryrefslogtreecommitdiff
path: root/plugins/datetimestamps.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-05-24 19:29:50 -0400
committerjgmdev <jgmdev@gmail.com>2022-05-24 19:29:50 -0400
commit35e947d1933613bb0b5a1488bf0fa4587f98ef7d (patch)
tree07d2515f44db03b1e865f6aef6adfd12b118890b /plugins/datetimestamps.lua
parentc1f3671e2a8defbc67d1e77c72d5866f2825cdb5 (diff)
downloadlite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.tar.gz
lite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.zip
added config_spec and other plugin compatibility fixes.
Diffstat (limited to 'plugins/datetimestamps.lua')
-rw-r--r--plugins/datetimestamps.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/plugins/datetimestamps.lua b/plugins/datetimestamps.lua
index 2880f99..2cbc410 100644
--- a/plugins/datetimestamps.lua
+++ b/plugins/datetimestamps.lua
@@ -29,7 +29,32 @@ from https://www.lua.org/pil/22.1.html
config.plugins.datetimestamps = common.merge({
format_datestamp = "%Y%m%d",
format_datetimestamp = "%Y%m%d_%H%M%S",
- format_timestamp = "%H%M%S"
+ format_timestamp = "%H%M%S",
+ -- The config specification used by the settings gui
+ config_spec = {
+ name = "Date and Time Stamps",
+ {
+ label = "Date",
+ description = "Date specification defined with Lua date/time place holders.",
+ path = "format_datestamp",
+ type = "string",
+ default = "%Y%m%d"
+ },
+ {
+ label = "Time",
+ description = "Time specification defined with Lua date/time place holders.",
+ path = "format_timestamp",
+ type = "string",
+ default = "%H%M%S"
+ },
+ {
+ label = "Date and Time",
+ description = "Date and time specification defined with Lua date/time place holders.",
+ path = "format_datetimestamp",
+ type = "string",
+ default = "%Y%m%d_%H%M%S"
+ }
+ }
}, config.plugins.datetimestamps)
local function datestamp()