mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +00:00
fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing
This commit is contained in:
parent
bd1f523df5
commit
5bf237820d
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue