Closed nfwyst closed 1 month ago
I have to disable it when move manually for now:
local timer = vim.uv.new_timer()
local is_disabled = false
local function disable_context_when_move()
AUTOCMD({ "CursorMoved", "CursorMovedI" }, {
group = AUTOGROUP("__disable_context__", { clear = true }),
callback = function(event)
local buf = event.buf
local is_file = event.file ~= ""
local is_chat = IS_GPT_PROMPT_CHAT(buf)
if is_chat or not is_file then
return
end
if not is_disabled then
vim.cmd("TSContextDisable")
is_disabled = true
end
SET_TIMER(timer, IS_MAC and 500 or 1500, function()
vim.cmd("TSContextEnable")
is_disabled = false
end)
end,
})
end
Description
cursor flickering when move up or down on my Linux system with poor performance
Neovim version
0.10.1
Expected behavior
cursor move smooth
Actual behavior
cursor flickering and movement is slow
Minimal config
Steps to reproduce