aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/autowrap.lua10
-rw-r--r--plugins/centerdoc.lua14
-rw-r--r--plugins/rainbowparen.lua10
3 files changed, 17 insertions, 17 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua
index 238053d..577a1b9 100644
--- a/plugins/autowrap.lua
+++ b/plugins/autowrap.lua
@@ -6,7 +6,7 @@ local common = require "core.common"
local DocView = require "core.docview"
config.plugins.autowrap = common.merge({
- enable = false,
+ enabled = false,
files = { "%.md$", "%.txt$" },
-- The config specification used by the settings gui
config_spec = {
@@ -14,7 +14,7 @@ config.plugins.autowrap = common.merge({
{
label = "Enable",
description = "Activates text auto wrapping by default.",
- path = "enable",
+ path = "enabled",
type = "toggle",
default = false
},
@@ -34,7 +34,7 @@ local on_text_input = DocView.on_text_input
DocView.on_text_input = function(self, ...)
on_text_input(self, ...)
- if not config.plugins.autowrap.enable then return end
+ if not config.plugins.autowrap.enabled then return end
-- early-exit if the filename does not match a file type pattern
local filename = self.doc.filename or ""
@@ -61,8 +61,8 @@ end
command.add(nil, {
["auto-wrap:toggle"] = function()
- config.plugins.autowrap.enable = not config.plugins.autowrap.enable
- if config.plugins.autowrap.enable then
+ config.plugins.autowrap.enabled = not config.plugins.autowrap.enabled
+ if config.plugins.autowrap.enabled then
core.log("Auto wrap: on")
else
core.log("Auto wrap: off")
diff --git a/plugins/centerdoc.lua b/plugins/centerdoc.lua
index fb5943c..09c862a 100644
--- a/plugins/centerdoc.lua
+++ b/plugins/centerdoc.lua
@@ -8,7 +8,7 @@ local treeview = require "plugins.treeview"
local DocView = require "core.docview"
config.plugins.centerdoc = common.merge({
- enable = true,
+ enabled = true,
zen_mode = false
}, config.plugins.centerdoc)
@@ -18,7 +18,7 @@ local get_gutter_width = DocView.get_gutter_width
function DocView:draw_line_gutter(line, x, y, width)
local lh
- if not config.plugins.centerdoc.enable then
+ if not config.plugins.centerdoc.enabled then
lh = draw_line_gutter(self, line, x, y, width)
else
local real_gutter_width = get_gutter_width(self)
@@ -30,7 +30,7 @@ end
function DocView:get_gutter_width()
- if not config.plugins.centerdoc.enable then
+ if not config.plugins.centerdoc.enabled then
return get_gutter_width(self)
else
local real_gutter_width = get_gutter_width(self)
@@ -52,12 +52,12 @@ local function toggle_zen_mode(enabled)
previous_treeview_status = treeview.visible
previous_statusbar_status = core.status_view.visible
- config.plugins.centerdoc.enable = true
+ config.plugins.centerdoc.enabled = true
system.set_window_mode("fullscreen")
treeview.visible = false
command.perform "status-bar:hide"
else
- config.plugins.centerdoc.enable = false
+ config.plugins.centerdoc.enabled = false
system.set_window_mode(previous_win_status)
treeview.visible = previous_treeview_status
core.status_view.visible = previous_statusbar_status
@@ -72,7 +72,7 @@ config.plugins.centerdoc.config_spec = {
{
label = "Enable",
description = "Activates document centering by default.",
- path = "enable",
+ path = "enabled",
type = "toggle",
default = true
},
@@ -98,7 +98,7 @@ config.plugins.centerdoc.config_spec = {
command.add(nil, {
["center-doc:toggle"] = function()
- config.plugins.centerdoc.enable = not config.plugins.centerdoc.enable
+ config.plugins.centerdoc.enabled = not config.plugins.centerdoc.enabled
end,
["center-doc:zen-mode-toggle"] = function()
toggle_zen_mode(not config.plugins.centerdoc.zen_mode)
diff --git a/plugins/rainbowparen.lua b/plugins/rainbowparen.lua
index 1df56ed..04cdfaf 100644
--- a/plugins/rainbowparen.lua
+++ b/plugins/rainbowparen.lua
@@ -8,7 +8,7 @@ local tokenizer = require "core.tokenizer"
local Highlighter = require "core.doc.highlighter"
config.plugins.rainbowparen = common.merge({
- enable = true
+ enabled = true
}, config.plugins.rainbowparen)
style.syntax.paren_unbalanced = style.syntax.paren_unbalanced or { common.color "#DC0408" }
@@ -30,7 +30,7 @@ local function parenstyle(parenstack)
end
function tokenizer.tokenize(syntax, text, state)
- if not config.plugins.rainbowparen.enable then
+ if not config.plugins.rainbowparen.enabled then
return tokenize(syntax, text, state)
end
state = state or {}
@@ -72,7 +72,7 @@ function tokenizer.tokenize(syntax, text, state)
end
local function toggle_rainbowparen(enabled)
- config.plugins.rainbowparen.enable = enabled
+ config.plugins.rainbowparen.enabled = enabled
for _, doc in ipairs(core.docs) do
doc.highlighter = Highlighter(doc)
doc:reset_syntax()
@@ -85,7 +85,7 @@ config.plugins.rainbowparen.config_spec = {
{
label = "Enable",
description = "Activates rainbow parenthesis coloring by default.",
- path = "enable",
+ path = "enabled",
type = "toggle",
default = true,
on_apply = function(enabled)
@@ -96,6 +96,6 @@ config.plugins.rainbowparen.config_spec = {
command.add(nil, {
["rainbow-parentheses:toggle"] = function()
- toggle_rainbowparen(not config.plugins.rainbowparen.enable)
+ toggle_rainbowparen(not config.plugins.rainbowparen.enabled)
end
})