We now have a concept of a 'backend' this is the same as the current sorters and finders but with added info like the keymap so they can all be registered as one. This will allow us to split our backends into modues so we can better maintain then.
17 lines
343 B
Lua
17 lines
343 B
Lua
local libivy = require "ivy.libivy"
|
|
local utils = require "ivy.utils"
|
|
|
|
local function items(term)
|
|
return libivy.ivy_files(term, vim.fn.getcwd())
|
|
end
|
|
|
|
local files = {
|
|
name = "Files",
|
|
command = "IvyFd",
|
|
description = "Find files in the project",
|
|
keymap = "<leader>p",
|
|
items = items,
|
|
callback = utils.file_action(),
|
|
}
|
|
|
|
return files
|