Xuyuanp / scrollbar.nvim

scrollbar for neovim
Apache License 2.0
269 stars 10 forks source link

Getting significant lag together with sexy_scroller.vim plugin #15

Open mawkler opened 4 years ago

mawkler commented 4 years ago

When using this plugin together with the sexy_scroller.vim, which is a plugin that adds a scrolling animation to actions like <c-u>/<c-d>, I'm getting a significant lag which makes animations unusably slow. Disabling scrollbar.nvim prevents the scroll lag. Is this anything that could be dealt with in any way or should I simply stop using one of the two plugins?

The odd thing is that now when I try to reproduce the problem it works just fine. It might be that the lag starts after using Neovim for a couple of minutes, I'm not sure yet.

Xuyuanp commented 4 years ago

Sorry, I can't reproduce the problem. Could you share your configuration?

jeromedalbert commented 4 years ago

Not a solution to your problem, but a potential workaround: I've been using vim-smoothie for smooth scrolling, and it seems to work fine-ish with scrollbar.nvim

mawkler commented 4 years ago

@Xuyuanp I've tried to reproduce the problem but can't do it consistently, I can't tell why or when it it appears. The odd thing is, as previously mentioned, that I have to use Neovim for a while before it starts lagging. This is the scrollbar config that I use:

augroup ScrollbarInit
  autocmd!
  autocmd WinEnter,FocusGained,CursorMoved,VimResized * silent! lua require('scrollbar').show()
  autocmd WinLeave,FocusLost,CursorHold               * silent! lua require('scrollbar').clear()
augroup end

  let g:scrollbar_right_offset = 0
  let g:scrollbar_highlight = {
        \ 'head': 'NonText',
        \ 'body': 'NonText',
        \ 'tail': 'NonText',
        \ }

  let g:scrollbar_shape = {
        \ 'head': '▖',
        \ 'body': '▌',
        \ 'tail': '▘',
        \ }

But since I use a lot of other plugins it's not very easy to reproduce. The problem did arise though because I installed this plugin. Here's a link to my .vimrc.

Xuyuanp commented 4 years ago

I'm on vacation recently, will take a look later

Xuyuanp commented 4 years ago

@Melkster Can you provide the minimal config to reproduce this problem?

mawkler commented 4 years ago

@Xuyuanp As mentioned the problem arises randomly after using Neovim for a while, and it is therefore very difficult troubleshoot and to produce a minimal .vimrc since I use a lot of plugins. Perhaps we should close this issue for now and hope that someone else with a smaller config that is easier to troubleshoot runs in to the same issue.

Edit: It does seem to arise more often (perhaps only) in large files, i.e ⪆ 1000 lines.