From e89b2a6c224c6dcb7c654cbb66e13b47b70ef476 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 10 Apr 2024 02:56:22 -0500 Subject: [PATCH] fix(nvim): `pcall` statuscol hack --- dots/.config/nvim/lua/plugins/configs/statuscol.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dots/.config/nvim/lua/plugins/configs/statuscol.lua b/dots/.config/nvim/lua/plugins/configs/statuscol.lua index 9bfc17c1..9cc152c2 100644 --- a/dots/.config/nvim/lua/plugins/configs/statuscol.lua +++ b/dots/.config/nvim/lua/plugins/configs/statuscol.lua @@ -11,8 +11,10 @@ return { callback = function() local win = vim.api.nvim_get_current_win() local set_opts = function() - vim.wo[win].statuscolumn = [[%!v:lua.StatusCol()]] - vim.wo[win].foldcolumn = "1" + pcall(function() + vim.wo[win].statuscolumn = [[%!v:lua.StatusCol()]] + vim.wo[win].foldcolumn = "1" + end) end set_opts() vim.defer_fn(set_opts, 10)