Skip to content

Commit

Permalink
feat(neovide): implement custom options and reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ekorchmar authored and folke committed Jul 6, 2024
1 parent 1642c08 commit dd55508
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/zen-mode/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,21 @@ function M.neovide(state, disable, opts)
state.scale = vim.g.neovide_scale_factor
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * opts.scale
end
if opts.disable_animations then
for key, value in pairs(opts.disable_animations) do
state[key] = vim.g[key]
vim.g[key] = value
end
end
else
if opts.scale ~= 1 then
vim.g.neovide_scale_factor = state.scale
end
if opts.disable_animations then
for key, _ in pairs(opts.disable_animations) do
vim.g[key] = state[key]
end
end
end
end

Expand Down

0 comments on commit dd55508

Please sign in to comment.