diff options
author | jgmdev <jgmdev@gmail.com> | 2023-01-12 21:51:26 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2023-01-12 21:51:33 -0400 |
commit | 636a7044c7cc49c1bf458d30069d41b1502a3e14 (patch) | |
tree | a6cb906abde7d2181a922c1686c8d28b25a401f0 /plugins | |
parent | 306fb17d9476e87c46bb926a1d42aebc9988332e (diff) | |
download | lite-xl-plugins-636a7044c7cc49c1bf458d30069d41b1502a3e14.tar.gz lite-xl-plugins-636a7044c7cc49c1bf458d30069d41b1502a3e14.zip |
minimap: use settings new color widget support
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/minimap.lua | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/plugins/minimap.lua b/plugins/minimap.lua index 75eb272..ac94849 100644 --- a/plugins/minimap.lua +++ b/plugins/minimap.lua @@ -135,29 +135,21 @@ config.plugins.minimap = common.merge({ }, { label = "Selection Color", - description = "Background color of selected text in html notation eg: #FFFFFF. Leave empty to use default.", - path = "selection_color_html", - type = "string", - on_apply = function(value) - if value and value:match("#%x%x%x%x%x%x") then - config.plugins.minimap.selection_color = { common.color(value) } - else - config.plugins.minimap.selection_color = nil - end - end + description = "Background color of selected text.", + path = "selection_color", + type = "color", + default = string.format("#%02X%02X%02X%02X", + style.dim[1], style.dim[2], style.dim[3], style.dim[4] + ) }, { label = "Caret Color", - description = "Background color of active line in html notation eg: #FFFFFF. Leave empty to use default.", - path = "caret_color_html", - type = "string", - on_apply = function(value) - if value and value:match("#%x%x%x%x%x%x") then - config.plugins.minimap.caret_color = { common.color(value) } - else - config.plugins.minimap.caret_color = nil - end - end + description = "Background color of active line.", + path = "caret_color", + type = "color", + default = string.format("#%02X%02X%02X%02X", + style.caret[1], style.caret[2], style.caret[3], style.caret[4] + ) }, { label = "Highlight Alignment", @@ -663,4 +655,3 @@ command.add("core.docview!", { }) return MiniMap - |