nvim: Move switch options from ]o to ]s maps

Function is the same, `]s` for [S]witching something 'off', and `]s` for
[S]witching something on.
This commit is contained in:
Marty Oehme 2025-06-12 12:12:49 +02:00
parent 3f4c057ffe
commit b0ed357037
Signed by: Marty
GPG key ID: 4E535BC19C61886E
4 changed files with 23 additions and 19 deletions

View file

@ -7,8 +7,8 @@ if is_available("which-key") then
{ "<leader>v", group = "vim" },
{ "<leader>s", group = "show" },
{ "<localleader>Z", group = "spelling" },
{ "]o", group = "options" },
{ "[o", group = "options" },
{ "]s", group = "switch" },
{ "[s", group = "switch" },
})
end

View file

@ -290,7 +290,7 @@ return {
desc = "floating file browser",
},
{
"[oi",
"[si",
function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false }))
@ -298,7 +298,7 @@ return {
desc = "no italic comments",
},
{
"]oi",
"]si",
function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", {}, c, { italic = true }))

View file

@ -48,7 +48,7 @@ local prose_plugs = {
ft = prose_ft,
keys = {
{
"[ow",
"[sw",
function()
require("wrapping").soft_wrap_mode()
end,
@ -56,7 +56,7 @@ local prose_plugs = {
desc = "soft wrap",
},
{
"]ow",
"]sw",
function()
require("wrapping").hard_wrap_mode()
end,

View file

@ -57,32 +57,36 @@ return {
},
keys = {
{
"[oc",
"[sc",
function()
require("colorizer").detach_from_buffer(0)
end,
{ silent = true, desc = "colorize disable" },
silent = true,
desc = "colorize disable",
},
{
"]oc",
"]sc",
function()
require("colorizer").attach_to_buffer(0)
end,
{ silent = true, desc = "colorize enable" },
silent = true,
desc = "colorize enable",
},
{
"]oC",
function()
require("colorizer").attach_to_buffer(0, { mode = "background" })
end,
{ silent = true, desc = "colorize bg" },
},
{
"[oC",
"[sC",
function()
require("colorizer").attach_to_buffer(0, { mode = "virtualtext" })
end,
{ silent = true, desc = "colorize eol" },
silent = true,
desc = "colorize eol",
},
{
"]sC",
function()
require("colorizer").attach_to_buffer(0, { mode = "background" })
end,
silent = true,
desc = "colorize bg",
},
},
},