diff --git a/dots/.config/nvim/lua/plugins/configs/statuscol.lua b/dots/.config/nvim/lua/plugins/configs/statuscol.lua index 6586e7da..9d1baeef 100644 --- a/dots/.config/nvim/lua/plugins/configs/statuscol.lua +++ b/dots/.config/nvim/lua/plugins/configs/statuscol.lua @@ -5,6 +5,25 @@ return { local builtin = require("statuscol.builtin") 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 -- This, in effect, extends the CursorLine background highlight into the signcolumn vim.uv.new_timer():start(