dotfiles/nvim/lua/neovide.lua

34 lines
724 B
Lua
Raw Normal View History

2023-12-24 22:54:03 +01:00
local options = {
2024-01-09 18:14:03 +01:00
scroll_animation_far_lines = 100,
scroll_animation_length = 0.05,
cursor_animation_length = 0.05,
2023-12-24 22:54:03 +01:00
}
for key, value in pairs(options) do
vim.g['neovide_' .. key] = value
end
2023-07-29 21:15:17 +02:00
-- Japanese IME compat
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
})