Skip to content

Commit

Permalink
feat(neovide): implement scaling 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 97ddeaf commit 1642c08
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/zen-mode/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ function M.tmux(state, disable, opts)
end
end

function M.neovide(state, disable, opts)
if not vim.g.neovide then
return
end
if disable then
if opts.scale ~= 1 then
state.scale = vim.g.neovide_scale_factor
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * opts.scale
end
else
if opts.scale ~= 1 then
vim.g.neovide_scale_factor = state.scale
end
end
end

function M.diagnostics(state, disable)
if disable then
vim.diagnostic.disable(0)
Expand Down

0 comments on commit 1642c08

Please sign in to comment.