Public Access
disable wrapping plugin
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
local M = {}
|
||||
|
||||
--- Toggle wrapping, or force it to the provided state.
|
||||
--- This plugin is buggy, so it does nothing
|
||||
--- @param enabled? boolean
|
||||
function M.toggle(enabled)
|
||||
if enabled == nil then
|
||||
enabled = not vim.wo.wrap
|
||||
end
|
||||
|
||||
vim.wo.wrap = enabled
|
||||
vim.wo.linebreak = enabled
|
||||
vim.wo.breakindent = enabled
|
||||
vim.bo.textwidth = enabled and 80 or 0
|
||||
vim.bo.wrapmargin = 0
|
||||
-- if enabled == nil then
|
||||
-- enabled = not vim.wo.wrap
|
||||
-- end
|
||||
--
|
||||
-- vim.wo.wrap = enabled
|
||||
-- vim.wo.linebreak = enabled
|
||||
-- vim.wo.breakindent = enabled
|
||||
-- vim.bo.textwidth = enabled and 80 or 0
|
||||
-- vim.bo.wrapmargin = 0
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user