How to stop lualine from flickering when selecting options in the coc menu? #5154
-
I am using lualine and each time I navigate through the coc menu with my coc settings are minimal: return {
'neoclide/coc.nvim',
config = function()
vim.g.coc_global_extensions = {
'coc-clangd',
'coc-css',
'coc-html',
'coc-lua',
'coc-solargraph',
'coc-solargraph',
'coc-vimlsp',
}
vim.cmd[[
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
]]
end
} Screen.Recording.2024-10-17.at.20.53.34.mov |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@skamsie Hi. inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>" I guess your coc configuration code is similar to the above configuration. The issue lies in the Lines 134 to 136 in 3b8869a In fact, they call Back to the coc issue, you can try modifying your configuration by changing inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? "<cmd>call coc#pum#_navigate(1,0)<cr>" :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? "<cmd>call coc#pum#_navigate(0,0)<cr>" : "\<C-h>" This way, the original functions are called through |
Beta Was this translation helpful? Give feedback.
@skamsie
It might be that I didn't explain it clearly enough before. What I mean is that whether it's the default keymap of coc or your custom keymap, as long as it uses the
coc#pum#prev
andcoc#pum#next
keymaps, this issue will occur.coc.nvim/plugin/coc.vim
Lines 710 to 715 in 3b8869a
You can see in the coc source code that these two keymaps are bound by default. So, as I mentioned above, you can set a keymap to over…