local function H()vim.o.guifont="\077\111\110\097\115\112\097\099\101 \078\101\111\110\058\104\049\051\058\035\101-\115\117\098\112\105\120\101\108\097\110\116\105\097\108\105\097\115"vim.o.linespace=10 vim.g.neovide_scale_factor=1.0 vim.g.neovide_floating_shadow=true vim.g.neovide_floating_z_height=15 vim.g.neovide_light_angle_degrees=45 vim.g.neovide_light_radius=10 vim.g.neovide_hide_mouse_when_typing=true vim.g.neovide_refresh_rate=60 vim.g.neovide_no_idle=false vim.g.neovide_input_macos_alt_is_meta=true vim.g.neovide_touch_deadzone=6 vim.g.neovide_scroll_animation_length=.3 vim.g.neovide_cursor_animation_length=.05 vim.g.neovide_cursor_trail_size=.2 vim.g.neovide_cursor_antialiasing=true vim.keymap.set("\110","\060\065--\062",function()vim.g.neovide_scale_factor=vim.g.neovide_scale_factor*.90909090909091 end,{desc="\073\110\099\114\101\097\115\101 \078\101\111\118\105\100\101 \101\100\105\116\111\114 \102\111\110\116"})vim.keymap.set("\110","\060\065-\043\062",function()vim.g.neovide_scale_factor=vim.g.neovide_scale_factor*1.1 end,{desc="\068\101\099\114\101\097\115\101 \078\101\111\118\105\100\101 \101\100\105\116\111\114 \102\111\110\116"})vim.keymap.set("\110","\060\065-\061\062",function()vim.g.neovide_scale_factor=1.0 end,{desc="\082\101\116\117\114\110 \078\101\111\118\105\100\101 \098\097\099\107 \116\111 \110\111\114\109\097\108 \102\111\110\116"})local H=vim.api.nvim_create_augroup("\057\095\078\101\111\118\105\100\101",{})local A vim.api.nvim_create_autocmd("\067\109\100\108\105\110\101\069\110\116\101\114",{group=H,callback=function()if vim.o.ch==0 then A=vim.o.ch vim.o.ch=1 end end})vim.api.nvim_create_autocmd("\067\109\100\108\105\110\101\076\101\097\118\101",{group=H;callback=function()vim.o.ch=A end})end H()
local function setup()
  vim.o.guifont = "Monaspace Neon:h13:#e-subpixelantialias"

  vim.o.linespace = 10
  vim.g.neovide_scale_factor = 1.0
  vim.g.neovide_floating_shadow = true
  vim.g.neovide_floating_z_height = 15
  vim.g.neovide_light_angle_degrees = 45
  vim.g.neovide_light_radius = 10
  vim.g.neovide_hide_mouse_when_typing = true
  vim.g.neovide_refresh_rate = 60
  vim.g.neovide_no_idle = false
  vim.g.neovide_input_macos_alt_is_meta = true
  vim.g.neovide_touch_deadzone = 6
  vim.g.neovide_scroll_animation_length = 0.3
  vim.g.neovide_cursor_animation_length = 0.05
  vim.g.neovide_cursor_trail_size = 0.2
  vim.g.neovide_cursor_antialiasing = true

  vim.keymap.set("n", "<A-->", function()
    vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * (1 / 1.1)
  end, { desc = "Increase Neovide editor font" })

  vim.keymap.set("n", "<A-+>", function()
    vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * 1.1
  end, { desc = "Decrease Neovide editor font" })

  vim.keymap.set("n", "<A-=>", function()
    vim.g.neovide_scale_factor = 1.0
  end, { desc = "Return Neovide back to normal font" })

  local group = vim.api.nvim_create_augroup("9_Neovide", {})

  -- Neovide has a weird flickering bug for commandheight 0
  local old_height
  vim.api.nvim_create_autocmd("CmdlineEnter", {
    group = group,
    callback = function()
      if vim.o.ch == 0 then
        old_height = vim.o.ch
        vim.o.ch = 1
      end
    end,
  })
  vim.api.nvim_create_autocmd("CmdlineLeave", {
    group = group,
    callback = function()
      vim.o.ch = old_height
    end,
  })
end

setup()
