disable wrapping plugin

This commit is contained in:
2026-09-16 18:48:10 +02:00
parent 7ed28b5abf
commit 3ba2f15222
+10 -9
View File
@@ -1,17 +1,18 @@
local M = {} local M = {}
--- Toggle wrapping, or force it to the provided state. --- Toggle wrapping, or force it to the provided state.
--- This plugin is buggy, so it does nothing
--- @param enabled? boolean --- @param enabled? boolean
function M.toggle(enabled) function M.toggle(enabled)
if enabled == nil then -- if enabled == nil then
enabled = not vim.wo.wrap -- enabled = not vim.wo.wrap
end -- end
--
vim.wo.wrap = enabled -- vim.wo.wrap = enabled
vim.wo.linebreak = enabled -- vim.wo.linebreak = enabled
vim.wo.breakindent = enabled -- vim.wo.breakindent = enabled
vim.bo.textwidth = enabled and 80 or 0 -- vim.bo.textwidth = enabled and 80 or 0
vim.bo.wrapmargin = 0 -- vim.bo.wrapmargin = 0
end end
return M return M