diff --git a/README.md b/README.md index 447abbc9469e4..30c983e2e94db 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,13 @@ require('boole').setup({ mappings = { increment = '', decrement = '' - } + }, + -- Key value pairs of additional replacements + -- increment: (key => value) + -- decrement: (value => key) + pair_additions = { + ["False"] = "True", + ["True"] = "False" + }, }) ``` diff --git a/lua/boole.lua b/lua/boole.lua index f99b5c9791073..f73eebff7be7e 100644 --- a/lua/boole.lua +++ b/lua/boole.lua @@ -130,6 +130,12 @@ M.setup = function(options) if options == nil then return 1 end + if options.pair_additions ~= nil then + for key,val in pairs(options.pair_additions) do + generate_hashmaps(key, val) + end + end + if options.mappings.increment ~= nil then vim.keymap.set( { 'n', 'v' },