Open kitallen23 opened 1 month ago
For now, you need to remap the function bound to u
. Just setting it to false will not work.
From memory, I wasn't able to rebind it either. I'll try that when I'm back at my pc later though. However I'm not sure that rebinding it would help in my case?
Just tested; you were correct that it seems as though it can be remapped, but it cannot be unmapped. My use case is still broken though (remapping doesn't help in my case).
I have the same problem and further more remapping ["<c-s>"] = "SplitOpen",
doesn't work and results in a similar error:
E5108: Error executing lua: ...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:146: table index is nil
stack traceback:
...hare/nvim/lazy/neogit/lua/neogit/buffers/status/init.lua:146: in function 'open'
$HOME/.local/share/nvim/lazy/neogit/lua/neogit.lua:120: in function 'open_status_buffer'
$HOME/.local/share/nvim/lazy/neogit/lua/neogit.lua:192: in function 'open'
$HOME/.config/nvim/lua/custom/plugins/neogit.lua:33: in function <$HOME/.config/nvim/lua/custom/plugins/neogit.lua:32>
(The stacktrace is slightly different that's why I'm posting it here.)
Here the full mappings.status
config (with a few things commented out because
the unmapping doesn't work.)
status = {
-- ["1"] = false,
-- ["2"] = false,
-- ["3"] = false,
-- ["4"] = false,
["<Leader>1"] = "Depth1",
["<Leader>2"] = "Depth2",
["<Leader>3"] = "Depth3",
["<Leader>4"] = "Depth4",
-- ["<c-x>"] = false,
["<c-s>"] = "SplitOpen",
},
I think you will need to remap the action to something similar to what @CKolkey mentioned.
For now, you need to remap the function bound to
u
. Just setting it to false will not work.
For example,
status = {
["<c-s>"] = "SplitOpen",
["<c-S>"] = "StageAll"
}
Description
Hi there. I've always struggled with the keymaps in neogit, but I've found a way. However after a recent update, I am unable to use neogit effectively as I can't map (or unmap) the "u" key.
For context, I'm a strange person and I have custom navigation keys. In my case 'u' happens to be my up key.
If anyone knows a workaround, I'd love to hear it.
Neovim version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713773202
Operating system and version
macOS 14.1.1
Steps to reproduce
Expected behavior
Status window should open.
Actual behavior
Minimal config