mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
style: run stylua
This commit is contained in:
@@ -12,29 +12,31 @@ local vaults = function(telekasten, opts)
|
||||
for k, v in pairs(vaults) do
|
||||
table.insert(_vaults, { k, v })
|
||||
end
|
||||
pickers.new(opts, {
|
||||
prompt_title = "Vaults",
|
||||
finder = finders.new_table({
|
||||
results = _vaults,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry,
|
||||
display = entry[1],
|
||||
ordinal = entry[1],
|
||||
}
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = "Vaults",
|
||||
finder = finders.new_table({
|
||||
results = _vaults,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry,
|
||||
display = entry[1],
|
||||
ordinal = entry[1],
|
||||
}
|
||||
end,
|
||||
}),
|
||||
sorter = conf.generic_sorter(opts),
|
||||
attach_mappings = function(prompt_bufnr, map)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
-- print(vim.inspect(selection))
|
||||
telekasten.chdir(selection.value[2])
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
}),
|
||||
sorter = conf.generic_sorter(opts),
|
||||
attach_mappings = function(prompt_bufnr, map)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
-- print(vim.inspect(selection))
|
||||
telekasten.chdir(selection.value[2])
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
}):find()
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
M.vaults = vaults
|
||||
|
||||
Reference in New Issue
Block a user