Files
nvim/lua/rua/core/neovide.lua
xfy 143e0a8d87 update colorscheme
add transpanrcy
2025-02-14 09:50:44 +08:00

40 lines
1.2 KiB
Lua

local opt = vim.opt
local function set_ime(args)
if args.event:match("Enter$") then
vim.g.neovide_input_ime = true
else
vim.g.neovide_input_ime = false
end
end
local ime_input = vim.api.nvim_create_augroup("ime_input", { clear = true })
vim.api.nvim_create_autocmd({ "InsertEnter", "InsertLeave" }, {
group = ime_input,
pattern = "*",
callback = set_ime,
})
vim.api.nvim_create_autocmd({ "CmdlineEnter", "CmdlineLeave" }, {
group = ime_input,
pattern = "[/\\?]",
callback = set_ime,
})
opt.guifont = "JetBrainsMono Nerd Font:h16"
-- g:neovide_transparency should be 0 if you want to unify transparency of content and title bar.
-- vim.g.neovide_transparency = 0.91
-- vim.g.neovide_background_color = "#0f1117" .. alpha()
vim.g.transparency = 0.91
vim.g.neovide_window_blurred = true
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_refresh_rate = 120
vim.g.neovide_confirm_quit = true
-- vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_scroll_animation_length = 0.1
vim.g.neovide_cursor_animation_length = 0.08
vim.g.neovide_cursor_trail_size = 0