nvim: improve ToggleGutter to remove indent trace, diagnostics
So that it fulfills its intended purpose: making vim ready for terminal level copying. This removes the extra overlay'd text segments from the window
This commit is contained in:
parent
7724f3d086
commit
afaf382e25
|
@ -4,18 +4,22 @@ local M, S = {}, {}
|
|||
|
||||
---Toggle the line numbers and diagnostic gutter
|
||||
function M.ToggleGutter()
|
||||
local o = vim.opt
|
||||
local o, diagnostic = vim.opt, vim.diagnostic
|
||||
|
||||
if o.number:get() then
|
||||
S.signcolumn = o.signcolumn:get()
|
||||
o.number = false
|
||||
o.relativenumber = false
|
||||
o.signcolumn = 'no'
|
||||
diagnostic.enable(false)
|
||||
else
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.signcolumn = S.signcolumn or 'yes:1'
|
||||
diagnostic.enable(true)
|
||||
end
|
||||
|
||||
vim.cmd 'IBLToggle'
|
||||
end
|
||||
|
||||
---Open a float with your local config files
|
||||
|
|
Loading…
Reference in New Issue