LunarVim/lua/lv-dial/init.lua
jimcornmell c7ff6f2b6f
Add True/False to dial (#707)
For languages like Python.
2021-07-05 12:01:10 -04:00

30 lines
757 B
Lua

local M = {}
M.config = function()
vim.cmd [[
nmap <C-a> <Plug>(dial-increment)
nmap <C-x> <Plug>(dial-decrement)
vmap <C-a> <Plug>(dial-increment)
vmap <C-x> <Plug>(dial-decrement)
vmap g<C-a> <Plug>(dial-increment-additional)
vmap g<C-x> <Plug>(dial-decrement-additional)
]]
local dial = require "dial"
dial.augends["custom#boolean"] = dial.common.enum_cyclic {
name = "boolean",
strlist = { "true", "false" },
}
table.insert(dial.config.searchlist.normal, "custom#boolean")
-- For Languages which prefer True/False, e.g. python.
dial.augends["custom#Boolean"] = dial.common.enum_cyclic {
name = "Boolean",
strlist = { "True", "False" },
}
table.insert(dial.config.searchlist.normal, "custom#Boolean")
end
return M