ivy.nvim/lua/ivy
Ade Attwood 91b6db9d76 feat: split out register backend so it can be used as an external API
Summary:

Split out the register backend function from being a private function. A
backend is a table that will define all of the attributes for a run function.
The attributes are as follows:

- **command** The name of the command that will be registered as a vim user command.
- **items** The callback function that will be passed to the run function that will gather the items for selection
- **callback** The callback function run when an item is selected

The following are optional:

- **keymap** The string passed to `nvim_set_keymap`, this will always be registered in normal mode
- **description** The text description that will be used in the user command
- **name** The name of the backend, this will fallback to the command if its not set

It will also allow to register a backend in a couple of different ways:

- With a backend module table
- With a backend module name
- With a backend module name and override options

This will look for for a lua module `ivy.backends.files`. The module will be
required and registered as a backend.

```lua
register_backend "ivy.backends.files"
```

This will do the same with the module string however, before the backend is
registered the keymap will be overridden

```lua
register_backend({ "ivy.backends.file", { keymap = "<C-p>" } })
```

Test Plan:

CI / Manual testing locally
2024-06-27 21:12:37 +01:00
..
backends feat: add ripgrep backend 2023-05-23 09:24:36 +01:00
controller.lua feat: add the paste functionality into the ivy prompt 2023-06-13 01:19:24 -07:00
controller_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
libivy.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00
libivy_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
matcher_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
prompt.lua feat: make delete word in promp work more like bash 2023-01-07 13:49:36 +00:00
prompt_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
register_backend.lua feat: split out register backend so it can be used as an external API 2024-06-27 21:12:37 +01:00
register_backend_spec.lua feat: split out register backend so it can be used as an external API 2024-06-27 21:12:37 +01:00
utils.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
utils_escape_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
utils_line_action_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
utils_vimgrep_action_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00
vim_mock.lua fix: opening terminal buffers 2023-04-26 07:26:12 +01:00
window.lua perf: add lua iteration to decrease loops in lua 2023-12-02 16:40:58 +00:00
window_spec.lua test: move the suite over to busted 2024-06-16 17:17:16 +01:00