Public Access
fix wrapping!!!
This commit is contained in:
@@ -1,18 +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.wo.colorcolumn = enabled and "" or "80"
|
||||||
-- vim.bo.wrapmargin = 0
|
vim.bo.textwidth = enabled and 0 or 80
|
||||||
|
vim.bo.wrapmargin = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local g = vim.g
|
local g = vim.g
|
||||||
local o = vim.opt
|
local o = vim.opt
|
||||||
|
|
||||||
g.mapleader = " " -- Uses space as the global leader key.
|
g.mapleader = " " -- Uses space as the global leader key.
|
||||||
g.maplocalleader = " " -- Uses space as the local leader key.
|
g.maplocalleader = " " -- Uses space as the local leader key.
|
||||||
g.clipboard = "osc52" -- Routes the + and * registers through OSC52 in terminal Neovim.
|
g.clipboard = "osc52" -- Routes the + and * registers through OSC52 in terminal Neovim.
|
||||||
@@ -11,7 +10,8 @@ o.cursorline = true -- Highlights the line under the cursor.
|
|||||||
o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active.
|
o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active.
|
||||||
o.scrolloff = 8 -- Keeps context lines visible around the cursor.
|
o.scrolloff = 8 -- Keeps context lines visible around the cursor.
|
||||||
o.signcolumn = "yes" -- Always reserves space for signs in the gutter.
|
o.signcolumn = "yes" -- Always reserves space for signs in the gutter.
|
||||||
o.colorcolumn = "+1" -- Highlights the preferred maximum line width.
|
o.colorcolumn = "80" -- Highlights the preferred maximum line width.
|
||||||
|
o.wrap = false -- Prevents long lines from wrapping on screen.
|
||||||
o.list = true -- Displays whitespace characters using listchars.
|
o.list = true -- Displays whitespace characters using listchars.
|
||||||
o.listchars = {
|
o.listchars = {
|
||||||
tab = "» ",
|
tab = "» ",
|
||||||
|
|||||||
Reference in New Issue
Block a user