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:
Paul Stemmet 2024-09-07 16:05:15 +00:00
parent 7724f3d086
commit afaf382e25
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
1 changed files with 5 additions and 1 deletions

View File

@ -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