feat(neovide): init

This commit is contained in:
winston 2023-02-25 16:42:13 +01:00
parent fd09498990
commit 0ae00fba5e
Signed by: winston
GPG key ID: 3786770EDBC2B481
2 changed files with 30 additions and 6 deletions

View file

@ -4,5 +4,24 @@ if not (present and vim.fn.has("mac") == 1) then
return
end
autodm.setup({})
local update_neovide_background = function()
if not vim.g.neovide then
return
end
local ctp_present, ctp = pcall(require, "catppuccin.palettes")
if ctp_present then
vim.g.neovide_background_color = ctp.get_palette().base
end
end
autodm.setup({
set_dark_mode = function()
vim.api.nvim_set_option("background", "dark")
update_neovide_background()
end,
set_light_mode = function()
vim.api.nvim_set_option("background", "light")
update_neovide_background()
end,
})
autodm.init()

View file

@ -82,9 +82,14 @@ if vim.g.neovide then
vim.g.neovide_scroll_animation_length = 0.3
vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_hide_mouse_when_typing = true
vim.opt.guifont = {
"BerkeleyMono Nerd Font",
"h14",
"#e-subpixelantialias",
}
vim.keymap.set(
"n",
"<M-CR>",
":let g:neovide_fullscreen = !g:neovide_fullscreen<CR>",
{
noremap = true,
silent = true,
}
)
vim.opt.guifont = { "BerkeleyMono Nerd Font", "h14", "#e-subpixelantialias" }
end