feat: add configurable Space leader bindings

This commit is contained in:
Valdemar Lorenzen
2026-10-08 13:54:48 +02:00
parent 5d2d67ab09
commit 5a67bf64a3
8 changed files with 958 additions and 28 deletions
+9 -1
View File
@@ -50,6 +50,7 @@ module Vamp
def initialize
@plugins = []
@bindings = []
@leader = "space"
end
def plugin(path)
@@ -59,6 +60,12 @@ module Vamp
nil
end
def leader=(key)
key = Vamp.string!(key, "leader key")
raise ArgumentError, "leader key must not be empty" if key.empty?
@leader = key
end
def core
Core
end
@@ -89,7 +96,8 @@ module Vamp
end
def response
{ "version" => 1, "type" => "config", "plugins" => @plugins, "bindings" => @bindings }
{ "version" => 1, "type" => "config", "plugins" => @plugins,
"bindings" => @bindings, "leader" => @leader }
end
end