We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7fa453 commit 761487eCopy full SHA for 761487e
lua/opencode/config.lua
@@ -190,7 +190,12 @@ local function update_keymap_prefix(prefix, default_prefix)
190
local new_mappings = {}
191
for key, opts in pairs(mappings) do
192
if vim.startswith(key, default_prefix) then
193
- new_mappings[prefix .. key:sub(#default_prefix + 1)] = opts
+ local new_key = prefix .. key:sub(#default_prefix + 1)
194
+
195
+ -- make sure there's not already a mapping for that key
196
+ if not new_mappings[new_key] then
197
+ new_mappings[new_key] = opts
198
+ end
199
else
200
new_mappings[key] = opts
201
end
0 commit comments