feat: default explorer to compact directory tree
This commit is contained in:
+18
-2
@@ -38,7 +38,7 @@ module Vamp
|
||||
end
|
||||
|
||||
module Modes
|
||||
%w[normal insert command search visual selection].each do |name|
|
||||
%w[normal insert command search visual selection tree].each do |name|
|
||||
mode = Mode.new(name.freeze).freeze
|
||||
define_singleton_method(name) { mode }
|
||||
end
|
||||
@@ -53,6 +53,8 @@ module Vamp
|
||||
@bindings = []
|
||||
@leader = "space"
|
||||
@file_explorer_side = "right"
|
||||
@file_picker_view = "list"
|
||||
@file_explorer_view = "tree"
|
||||
end
|
||||
|
||||
def plugin(path)
|
||||
@@ -74,6 +76,18 @@ module Vamp
|
||||
@file_explorer_side = side
|
||||
end
|
||||
|
||||
def file_picker_view=(view)
|
||||
view = Vamp.string!(view, "file picker view")
|
||||
raise ArgumentError, "file picker view must not be empty" if view.empty?
|
||||
@file_picker_view = view
|
||||
end
|
||||
|
||||
def file_explorer_view=(view)
|
||||
view = Vamp.string!(view, "file explorer view")
|
||||
raise ArgumentError, "file explorer view must not be empty" if view.empty?
|
||||
@file_explorer_view = view
|
||||
end
|
||||
|
||||
def core
|
||||
Core
|
||||
end
|
||||
@@ -106,7 +120,9 @@ module Vamp
|
||||
def response
|
||||
{ "version" => 1, "type" => "config", "plugins" => @plugins,
|
||||
"bindings" => @bindings, "leader" => @leader,
|
||||
"file_explorer_side" => @file_explorer_side }
|
||||
"file_explorer_side" => @file_explorer_side,
|
||||
"file_picker_view" => @file_picker_view,
|
||||
"file_explorer_view" => @file_explorer_view }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user