Skip to content

Commit

Permalink
keys: simplify notify conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 19, 2024
1 parent b22b6a7 commit 6c364ac
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions lua/nxvim/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ nx.map({
"<leader>ts",
function()
vim.o.spell = not vim.o.spell
if vim.o.spell then
vim.notify("Spell On")
else
vim.notify("Spell Off")
end
vim.notify("Spell " .. (vim.o.spell and "On" or "Off"))
end,
desc = "Toggle Spellcheck",
wk_label = "Spellcheck",
Expand All @@ -180,11 +176,7 @@ nx.map({
function()
-- "<Cmd>set list! list?<CR>",
vim.o.list = not vim.o.list
if vim.o.list then
vim.notify("Whitespace Characters On")
else
vim.notify("Whitespace Characters Off")
end
vim.notify("Whitespace Characters " .. (vim.o.list and "On" or "Off"))
end,
desc = "Toggle Whitespace Characters",
wk_label = "Whitespace Characters",
Expand All @@ -194,11 +186,7 @@ nx.map({
function()
vim.o.wrap = not vim.o.wrap
vim.o.linebreak = vim.o.wrap
if vim.o.wrap then
vim.notify("Line Wrap On")
else
vim.notify("Line Wrap Off")
end
vim.notify("Line Wrap " .. (vim.o.wrap and "On" or "Off"))
end,
desc = "Toggle Line Wrap",
wk_label = "Line Wrap",
Expand Down

0 comments on commit 6c364ac

Please sign in to comment.