feat(neovide): init
This commit is contained in:
parent
fd09498990
commit
0ae00fba5e
2 changed files with 30 additions and 6 deletions
|
@ -4,5 +4,24 @@ if not (present and vim.fn.has("mac") == 1) then
|
||||||
return
|
return
|
||||||
end
|
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()
|
autodm.init()
|
||||||
|
|
|
@ -82,9 +82,14 @@ if vim.g.neovide then
|
||||||
vim.g.neovide_scroll_animation_length = 0.3
|
vim.g.neovide_scroll_animation_length = 0.3
|
||||||
vim.g.neovide_input_macos_alt_is_meta = true
|
vim.g.neovide_input_macos_alt_is_meta = true
|
||||||
vim.g.neovide_hide_mouse_when_typing = true
|
vim.g.neovide_hide_mouse_when_typing = true
|
||||||
vim.opt.guifont = {
|
vim.keymap.set(
|
||||||
"BerkeleyMono Nerd Font",
|
"n",
|
||||||
"h14",
|
"<M-CR>",
|
||||||
"#e-subpixelantialias",
|
":let g:neovide_fullscreen = !g:neovide_fullscreen<CR>",
|
||||||
}
|
{
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
vim.opt.guifont = { "BerkeleyMono Nerd Font", "h14", "#e-subpixelantialias" }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue