feat(keymaps): added more keymaps

This commit is contained in:
Folke Lemaitre 2023-01-04 21:34:49 +01:00
parent 485d4f0232
commit 47fa58c2ed
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 51 additions and 10 deletions

View file

@ -73,4 +73,16 @@ function M.float_term(cmd, opts)
require("lazy.util").open_cmd(cmd, opts)
end
---@param silent boolean?
function M.toggle(option, silent)
vim.opt_local[option] = not vim.opt_local[option]:get()
if not silent then
vim.notify(
(vim.opt_local[option]:get() and "Enabled" or "Disabled") .. option,
vim.log.levels.INFO,
{ title = "Option" }
)
end
end
return M