Disable trimwhitespace and drawwhitespace via their configs (#1446)

Instead of completely disabling them, we now use their internal toggle.

Also moved `drawwhitespace` commands inside the plugin.

---

* Fixed bug where commands would show even when plugin was disbled. Also removed antiquated way of disabling.

* Fixed typos.

* Also moved trimwhitespace out of config, if it already has a default enabled value of false.

* Changed documentation.

* Clarified comments.
This commit is contained in:
Adam
2023-08-19 12:39:22 +08:00
committed by takase1121
parent bf35417f82
commit 6deca53303
6 changed files with 23 additions and 29 deletions
-16
View File
@@ -1,16 +0,0 @@
local command = require "core.command"
local config = require "core.config"
command.add(nil, {
["draw-whitespace:toggle"] = function()
config.draw_whitespace = not config.draw_whitespace
end,
["draw-whitespace:disable"] = function()
config.draw_whitespace = false
end,
["draw-whitespace:enable"] = function()
config.draw_whitespace = true
end,
})