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>v", group = "vim" },
{ "<leader>s", group = "show" }, { "<leader>s", group = "show" },
{ "<localleader>Z", group = "spelling" }, { "<localleader>Z", group = "spelling" },
{ "]o", group = "options" }, { "]s", group = "switch" },
{ "[o", group = "options" }, { "[s", group = "switch" },
}) })
end end

View file

@ -290,7 +290,7 @@ return {
desc = "floating file browser", desc = "floating file browser",
}, },
{ {
"[oi", "[si",
function() function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" }) local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false })) vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false }))
@ -298,7 +298,7 @@ return {
desc = "no italic comments", desc = "no italic comments",
}, },
{ {
"]oi", "]si",
function() function()
local c = vim.api.nvim_get_hl(0, { name = "Comment" }) local c = vim.api.nvim_get_hl(0, { name = "Comment" })
vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", {}, c, { italic = true })) 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, ft = prose_ft,
keys = { keys = {
{ {
"[ow", "[sw",
function() function()
require("wrapping").soft_wrap_mode() require("wrapping").soft_wrap_mode()
end, end,
@ -56,7 +56,7 @@ local prose_plugs = {
desc = "soft wrap", desc = "soft wrap",
}, },
{ {
"]ow", "]sw",
function() function()
require("wrapping").hard_wrap_mode() require("wrapping").hard_wrap_mode()
end, end,

View file

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