I am migrating from vimscript to lua for my keybindings and I have remapped the leader key as space:
vim.g.mapleader = " "
It works fine with all my key bindings. Except in visual mode.
When I am in visual mode, the leader is automatically rejected.
I thought .g.
make it global and for all modes? if not, how can I make this usable in all modes?
Update:
this is not a lua issue. I changed it back to vimscript and the issue is still there. the main change I made in the last 24 hours was updating to nvim 0.7
"<Space>"
instead?:let g:mapleader = " "
and:xnoremap <leader> :<C-u>echo "hello"<CR>
works fine