Public Access
disable wrapping plugin
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user