lspsaga.nvim光标移动时屏幕水平闪烁问题求助
关于lspsaga.nvim的水平屏幕闪烁问题
- 问题现象:使用lspsaga.nvim时,移动光标会触发屏幕水平闪烁,关闭该插件后问题消失,可确定由lspsaga引发
- 已尝试方案:将
code_action设为空字符串,未解决问题
我的lspsaga配置代码:
local status, saga = pcall(require, "lspsaga") if (not status) then return end local keymap = vim.keymap.set saga.setup{ ui = { -- currently only round theme theme = 'round', -- this option only work in neovim 0.9 title = false, -- border type can be single,double,rounded,solid,shadow. border = 'rounded', winblend = 6, expand = '', collapse = '', preview = ' ', code_action = '💡', diagnostic = '', incoming = ' ', outgoing = ' ', colors = { --float window normal background color -- normal_bg = '#232136', }, kind = {}, }, preview = { lines_above = 1, lines_below = 10, }, scroll_preview = { scroll_down = '<C-f>', scroll_up = '<C-b>', }, request_timeout = 2000, finder = { edit = { 'o', '<CR>' }, vsplit = 's', split = 'i', tabe = 't', quit = { 'q', '<ESC>' }, }, -- ライトバルブをすべて無効 lightbulb = { enable = false, enable_in_insert = false, sign = false, sign_priority = 40, virtual_text = false, }, diagnostic = { show_code_action = false, show_source = true, jump_num_shortcut = true, keys = { exec_action = 'o', quit = 'q', go_action = 'g' }, }, -- winbarのシンボルを無効化 symbol_in_winbar = { enable = false, separator = ' ', hide_keyword = true, show_file = true, folder_level = 2, respect_root = false, color_mode = true, }, }
解决建议
- 调整UI透明度:将配置中
ui.winblend的值改为0,半透明窗口渲染可能和终端/Neovim的渲染机制冲突,导致闪烁 - 更换边框样式:把
ui.border从rounded替换为solid或single,圆角边框的动态渲染可能存在性能问题 - 升级lspsaga到最新版本:旧版本可能存在未修复的渲染bug,执行插件更新命令(比如PackerSync或LazyUpdate)后重试
- 禁用所有动态UI元素:暂时关闭diagnostic相关的动态提示,或者尝试使用极简配置启动lspsaga,逐步排查触发闪烁的组件
- 检查Neovim版本:确保使用Neovim 0.9.x及以上的稳定版本,旧版本的窗口API可能存在兼容性问题
内容的提问来源于stack exchange,提问作者ankuru
相关产品推荐
相关产品推荐

