False positive: keymap collision warning ignores buffer type
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- neovim
- Domain
- developer-experience
Research direction
Search the source for the warning text 'are mapped to the same key' to find the keymap validation code. Check how it groups keymaps.explorer.select and keymaps.history.select, since they are scoped to different buffer types. Done when the same key bound in explorer and history no longer triggers the warning, while a real collision within one buffer type still does.
Written by the indexing model from the issue text.
Description
Setting explorer.select and history.select to the same key (e.g. <space>) triggers the warning:
[codediff] explorer.select, history.select are mapped to the same key <Space>. Only one of them can work; give the others different keys.
But explorer and history are separate buffer types with their own mappings — the keys never actually collide, since only one buffer is active at a time.
Here's my config:
Click to expand
{
diff = {
disable_inlay_hints = false,
hide_merge_artifacts = true,
jump_to_first_change = false,
compact = true,
},
explorer = {
initial_focus = 'modified',
icons = {
folder_closed = '',
folder_open = '',
},
view_mode = 'tree',
},
keymaps = {
view = {
quit = '<C-c>',
toggle_explorer = '`',
focus_explorer = '~',
next_hunk = ']g',
prev_hunk = '[g',
next_file = '<c-j>',
prev_file = '<c-k>',
},
explorer = {
select = '<space>',
toggle_view_mode = 'i',
},
history = {
select = '<space>',
},
conflict = {
accept_incoming = 'gc<', -- Accept incoming (theirs/left) change
accept_current = 'gc>', -- Accept current (ours/right) change
accept_both = 'gcb',
discard = 'gcx',
next_conflict = ']x',
prev_conflict = '[x',
diffget_incoming = '2do',
diffget_current = '3do',
},
},
}
- Dominant language
- Lua
- Stars
- 1.6k
- Forks
- 104
- Avg merge
- 16d 23h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from esmuellert/codediff.nvim
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
esmuellert/codediff.nvim#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
esmuellert/codediff.nvim#582 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
esmuellert/codediff.nvim#579 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
esmuellert/codediff.nvim#575 ·
-
Bug: explorer.focus_on_select = false ignored for added/untracked/deleted files in inline layoutOpenType/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
esmuellert/codediff.nvim#567 · 1 reaction ·
All issues in esmuellert/codediff.nvim
Similar issues
-
bug discord triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
AndyHazz/bookends.koplugin#134 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
coolsnowwolf/lede#14305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100