feat: add floating and docked searchable file picker

This commit is contained in:
Valdemar Lorenzen
2026-10-08 14:25:54 +02:00
parent 5a67bf64a3
commit c60e625555
12 changed files with 1820 additions and 34 deletions
+10 -1
View File
@@ -30,6 +30,7 @@ module Vamp
word_next word_previous word_end big_word_next big_word_previous big_word_end
select copy cut change paste_before paste_after
select_lines clone_above clone_below select_next skip_occurrence select_all
file_picker file_explorer
].each do |name|
action = Action.new("core.#{name}".freeze).freeze
define_singleton_method(name) { action }
@@ -51,6 +52,7 @@ module Vamp
@plugins = []
@bindings = []
@leader = "space"
@file_explorer_side = "right"
end
def plugin(path)
@@ -66,6 +68,12 @@ module Vamp
@leader = key
end
def file_explorer_side=(side)
side = Vamp.string!(side, "file explorer side")
raise ArgumentError, "file explorer side must not be empty" if side.empty?
@file_explorer_side = side
end
def core
Core
end
@@ -97,7 +105,8 @@ module Vamp
def response
{ "version" => 1, "type" => "config", "plugins" => @plugins,
"bindings" => @bindings, "leader" => @leader }
"bindings" => @bindings, "leader" => @leader,
"file_explorer_side" => @file_explorer_side }
end
end