mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
fix(ui): set wo options with local. don't use vim.wo
. See #829
This commit is contained in:
parent
678179543e
commit
7f4da7d511
3 changed files with 22 additions and 14 deletions
|
@ -10,6 +10,14 @@ function M.float(opts)
|
|||
return require("lazy.view.float")(opts)
|
||||
end
|
||||
|
||||
function M.wo(win, k, v)
|
||||
if vim.api.nvim_set_option_value then
|
||||
vim.api.nvim_set_option_value(k, v, { scope = "local", win = win })
|
||||
else
|
||||
vim.wo[win][k] = v
|
||||
end
|
||||
end
|
||||
|
||||
function M.open(uri)
|
||||
if M.file_exists(uri) then
|
||||
return M.float({ style = "", file = uri })
|
||||
|
@ -180,9 +188,9 @@ function M.markdown(msg, opts)
|
|||
vim.tbl_deep_extend("force", {
|
||||
title = "lazy.nvim",
|
||||
on_open = function(win)
|
||||
vim.wo[win].conceallevel = 3
|
||||
vim.wo[win].concealcursor = "n"
|
||||
vim.wo[win].spell = false
|
||||
M.wo(win, "conceallevel", 3)
|
||||
M.wo(win, "concealcursor", "n")
|
||||
M.wo(win, "spell", false)
|
||||
|
||||
vim.treesitter.start(vim.api.nvim_win_get_buf(win), "markdown")
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue