mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-12-25 12:14:19 +01:00
fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing
This commit is contained in:
@@ -104,7 +104,7 @@ opt.spelllang = { "en" }
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitkeep = "screen"
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.statuscolumn = [[%!v:lua.require'snacks.statuscolumn'.get()]]
|
||||
opt.statuscolumn = [[%!v:lua.LazyVim.statuscolumn()]]
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key
|
||||
|
||||
@@ -299,4 +299,9 @@ function M.memoize(fn)
|
||||
end
|
||||
end
|
||||
|
||||
-- Safe wrapper around snacks to prevent errors when LazyVim is still installing
|
||||
function M.statuscolumn()
|
||||
return package.loaded.snacks and require("snacks.statuscolumn").get() or ""
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user