chore(keymaps): add toggle options (#204)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-25 00:16:25 -04:00
committed by GitHub
parent 46ec0a50a7
commit 305d972849
6 changed files with 47 additions and 7 deletions

View File

@@ -43,6 +43,25 @@ end
H.keymaps = function()
vim.keymap.set({ "n", "v" }, Config.mappings.ask, M.toggle, { noremap = true })
vim.keymap.set("n", Config.mappings.refresh, M.refresh, { noremap = true })
Utils.toggle_map("n", Config.mappings.toggle.debug, {
name = "debug",
get = function()
return Config.debug
end,
set = function(state)
Config.override({ debug = state })
end,
})
Utils.toggle_map("n", Config.mappings.toggle.hint, {
name = "hint",
get = function()
return Config.hints.enabled
end,
set = function(state)
Config.override({ hints = { enabled = state } })
end,
})
end
H.autocmds = function()