Closed ghost closed 1 year ago
Hi @qube-03, I assume you're referring to the following lines in your Neovim config:
nvim-scrollview
has a bunch of builtin mappings for key sequences beginning with z
, so that scrollbars and signs are refreshed after commands that modify folds.
<nowait>
can be used for your mappings to prevent the delay when you press z
(see :help :map-Nowait>
), effectively disabling the scrollview mappings that are causing the issue for you. For example, kset('n', 'z', '<Home>')
from your config would become kset('n', 'z', '<Home>', {nowait = true})
.
I've updated the code in d2a9d1538741752642bb76ba1274e89d6213e69d so that a key sequence mapping will not be created if one already exists for a prefix of the sequence.
hey, thanks for the kind response
ive tried the nowait thing but until now have had little luck, ill see if i had any errors and will try again, thanks for the example too
(the config in question is wayyy outdated btw, but the same still applies)
just tried the nowait option exactly as you specified, no luck (tried with m this time)
it doesnt matter now though, i changed my binds so it works now
thanks for your efforts!
Glad to hear the problem is worked around.
Please let me know if you have any ideas for what the issue is or any steps I can use to reproduce. If I execute the following line, either in a Neovim config file or after starting Neovim, z
works as expected (effectively working like <home>
in normal mode, with no delay).
lua vim.keymap.set('n', 'z', '<Home>', {nowait = true})
yes it does do that, on the previous version from before this issue though, scrollview would have many bindings with z and so it would delay the actual input, not even { nowait = true } helped then
sadly enough another keybinding i used is m and ive rebound that now to not interfere with scrollview
so from what i can tell, the issue with keybindings interfering still persist, because it didnt detect that i also had m bound,
could be a misconfiguration on my end though
I have the same issue:
Error detected while processing function <lambda>120[1]..script /home/username/.local/share/nvim/lazy/nvim-scrollview/autoload/scrollview.vim:
line 507:
E227: mapping already exists for mj
Press ENTER or type command to continue
vim/keymap.lua:0: E227: mapping already exists for mj
Press ENTER or type command to continue
stack traceback:
Press ENTER or type command to continue
^I[C]: in function 'nvim_set_keymap'
Press ENTER or type command to continue
^Ivim/keymap.lua: in function 'set'
Press ENTER or type command to continue
^I...nvim/lazy/nvim-scrollview/lua/scrollview/signs/marks.lua:48: in function <...nvim/lazy/nvim-scrollview/lua/scrollview/signs/marks.lua:15>
I have bound mj
as a keybinding and scrollview
complains. Any workaround? Thank you!
Same here (mg
in my case), I'd like to disable any keymap creation by nvim-scrollview, as I don't manually toggle anything when using it.
I've re-opened this ticket. I think 01373406b2c83110b24c6759e0b24bd43d194b33 should fix the bug. Is the issue still present after that commit?
For me that fixes it. I re-enabled my mg
mapping and no more error messages appear. Thanks @dstein64, love how seamless this plugin works, aside from this small hiccup!
Glad to hear it's fixed. I'll close this issue for now and re-open if anyone is still having the problem.
The latest commit also fixed it for me too. Thank you for your prompt resolution. I appreciate it:)
im not home rn so i cant comment on anything really but thanks a lot for your commitment! ill be happy once i get home
md
doesn't work in Nerdtree now. When I write :map md
I get:
n m *@:call nerdtree#ui_glue#invokeKeyMap("m")<CR>
x md * md<Cmd>ScrollViewRefresh<CR>
n md * md<Cmd>ScrollViewRefresh<CR>
How can I turn off nvim-scrollview
for md
?
Thanks for letting me know @evmorov. I'll open a separate issue.
Until a proper fix is implemented, the following workaround can be used (but this will disable signs for marks). These lines would have to be executed before the plugin is loaded (e.g., from a Neovim config file).
VimScript
let g:scrollview_marks_characters = []
Lua
-- Lua method 1: setup() function
require('scrollview').setup({
...
marks_characters = {},
...
})
-- Lua method 2: config variable
vim.g.scrollview_marks_characters = {}
Thanks @dstein64! I confirm that the temporal solution works.
hi! this is my favorite scrollbar plugin, however ive got a really annoying issue
i use z in some of my keymaps i.e. to go to the start of the line
however scrollview uses MANY z bindings and ive got no clue how to
1: either remove scrollview binds all together 2: or disable any keybind beginning with z and then setting my own z binds
please help as this is gonna be keeping me from using scrollview, which would be a shame just because of one keybinding