mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-10 09:24:37 +02:00
refactor(options): prefer opt in place of vim.opt (#3167)
This commit is contained in:
parent
b601ade71c
commit
44d51e5a65
1 changed files with 8 additions and 8 deletions
|
@ -92,21 +92,21 @@ if vim.fn.has("nvim-0.10") == 1 then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Folding
|
-- Folding
|
||||||
vim.opt.foldlevel = 99
|
opt.foldlevel = 99
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
if vim.fn.has("nvim-0.9.0") == 1 then
|
||||||
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
|
opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
|
||||||
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
|
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
|
||||||
if vim.fn.has("nvim-0.10") == 1 then
|
if vim.fn.has("nvim-0.10") == 1 then
|
||||||
vim.opt.foldmethod = "expr"
|
opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
||||||
vim.opt.foldtext = ""
|
opt.foldtext = ""
|
||||||
vim.opt.fillchars = "fold: "
|
opt.fillchars = "fold: "
|
||||||
else
|
else
|
||||||
vim.opt.foldmethod = "indent"
|
opt.foldmethod = "indent"
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
|
vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue