Skip to content

Commit

Permalink
fix(options): use vim.opt and trigger Lazy ui reload when needed. F…
Browse files Browse the repository at this point in the history
…ixes #38
  • Loading branch information
folke committed Jan 11, 2023
1 parent 83d18db commit e405023
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lua/lazyvim/config/init.lua
Expand Up @@ -126,6 +126,10 @@ function M.load(name)
end,
})
end
if vim.bo.filetype == "lazy" then
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
vim.cmd([[do VimResized]])
end
end

M.did_init = false
Expand Down
3 changes: 1 addition & 2 deletions lua/lazyvim/config/options.lua
Expand Up @@ -3,8 +3,7 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "

-- set global only, to make sure we don't override the Lazy ui
local opt = vim.opt_global
local opt = vim.opt

opt.autowrite = true -- enable auto write
opt.clipboard = "unnamedplus" -- sync with system clipboard
Expand Down

0 comments on commit e405023

Please sign in to comment.