nvim: Fix signcolumn jumping

When lsp or gitsigns would show me a symbol in the signcolumn the whole
editor page would jump ever so slightly to the right (one symbol, to be
precise).

This fixes it to show numbers in the signcolumn and just exchange number
for sign when something should be shown.
Makes numbers a little less readable but editing experience a whole lot
smoother.
This commit is contained in:
Marty Oehme 2022-03-08 09:33:58 +01:00
parent 645248e83a
commit eb1dabc44f
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -1,19 +1,12 @@
require("helpers.vimoptions")
local default_builtins_disabled = {
"netrw",
"netrwPlugin"
}
local default_builtins_disabled = {"netrw", "netrwPlugin"}
local disable_builtins = function(builtins)
for _, plugin in pairs(builtins) do
vim.g["loaded_" .. plugin] = 1
end
for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end
end
local apply_options = function(opts)
for k, v in pairs(opts) do
vim.opt[k] = v
end
for k, v in pairs(opts) do vim.opt[k] = v end
end
local o = {
@ -39,6 +32,8 @@ local o = {
-- dNUMBERd deletions
number = true,
relativenumber = true,
-- puts the numbers into the signcolumn so when git/lsp show signs there's no jump
signcolumn = 'number',
-- keeps an undofile next to files so that you can even undo if vim is closed
-- in between
@ -67,13 +62,13 @@ local o = {
mouse = 'a',
-- pump all clippings into the system clipboard
clipboard='unnamedplus',
clipboard = 'unnamedplus',
-- turn of automatic resizing of individual splits
equalalways = false,
-- make sure there's always *some* context below cursor
scrolloff=4,
scrolloff = 4
}