I added these in my config:
t['gg'] = {'scroll', {'1 - vim.api.nvim_win_get_cursor(0)[1]', 'true', '1', '5', e}}
t['G'] = {'scroll', {'vim.api.nvim_buf_line_count(0) - vim.api.nvim_win_get_cursor(0)[1]', 'true', '1', '5', e}}
And it turns out that it doesn't work well when there are wrapped lines, because neoscroll uses gj and gk, which is good for other commands like <c-u>/<c-d> but bad for gg and G.
Or is there any way to get the display line number? I didn't find it in help or online.
I added these in my config:
And it turns out that it doesn't work well when there are wrapped lines, because neoscroll uses
gjandgk, which is good for other commands like<c-u>/<c-d>but bad forggandG.Or is there any way to get the display line number? I didn't find it in help or online.