From 6a9d0b3c6458c439a6138cb5d76e1df3a09522d7 Mon Sep 17 00:00:00 2001 From: mattwparas Date: Thu, 14 Sep 2023 17:50:31 -0700 Subject: [PATCH] reverse keymap overlay --- helix-term/src/commands/engine.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands/engine.rs b/helix-term/src/commands/engine.rs index 4eff04862..93c06a328 100644 --- a/helix-term/src/commands/engine.rs +++ b/helix-term/src/commands/engine.rs @@ -67,7 +67,8 @@ impl ScriptingEngine { pub fn get_keybindings() -> Option> { let mut map = HashMap::new(); - for kind in PLUGIN_PRECEDENCE { + // Overlay these in reverse, so the precedence applies correctly + for kind in PLUGIN_PRECEDENCE.iter().rev() { if let Some(keybindings) = manual_dispatch!(kind, get_keybindings()) { map.extend(keybindings); }