refactor(nvim): keep neogit status from screwing gutter up
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 40s
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 40s
This commit is contained in:
parent
5650c7d5dc
commit
faa997a6e3
@ -5,6 +5,25 @@ return {
|
|||||||
local builtin = require("statuscol.builtin")
|
local builtin = require("statuscol.builtin")
|
||||||
local last_sign_def_len = 0
|
local last_sign_def_len = 0
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||||
|
desc = "Ensure Neogit Status doesn't fuck the gutter up -- 🤮",
|
||||||
|
pattern = "*NeogitStatus*",
|
||||||
|
callback = function()
|
||||||
|
local win = vim.api.nvim_get_current_win()
|
||||||
|
local set_opts = function()
|
||||||
|
vim.wo[win].statuscolumn = [[%!v:lua.StatusCol()]]
|
||||||
|
vim.wo[win].signcolumn = "yes"
|
||||||
|
vim.wo[win].foldcolumn = "1"
|
||||||
|
end
|
||||||
|
set_opts()
|
||||||
|
vim.defer_fn(set_opts, 10)
|
||||||
|
vim.defer_fn(set_opts, 20)
|
||||||
|
vim.defer_fn(set_opts, 30)
|
||||||
|
vim.defer_fn(set_opts, 50)
|
||||||
|
vim.defer_fn(set_opts, 100)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- HACK: Ensure all signs get the correct CursorLineSign set to their "culhl" value
|
-- HACK: Ensure all signs get the correct CursorLineSign set to their "culhl" value
|
||||||
-- This, in effect, extends the CursorLine background highlight into the signcolumn
|
-- This, in effect, extends the CursorLine background highlight into the signcolumn
|
||||||
vim.uv.new_timer():start(
|
vim.uv.new_timer():start(
|
||||||
|
Loading…
Reference in New Issue
Block a user