When reading the output of a command we are now reading the stream line
by line and building the table of results. This will save us a loop of
the results later, if we returned a string we need to split the string
before adding each line to the completion buffer because nvim only
supports replacing one line at a time.
This makes the terminal go really funkie and sometimes crash when
printing the error messages to the current process stdout where nvim is
running.
Now the error output is sent to the `popen` output and displayed in the
ivy completion buffer without messing with the current process io.
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.
Now when you delete a word in a promp it will work more like how it
works in bash. If the text dose not end in a letter then the last word
and all of the tailing special characters will be deleted. If the text
dose end in a letter then only the last word will be deleted leaving the
special characters that are before the last word.
Examples:
| Before | After |
| -------------------| ----------- |
| `some word` | `some ` |
| `some word` | `some ` |
| `some word ` | `some ` |
This is getting set to latest. The docs say this could break CI due to
changes in stylua bit right now I think that is better than maintain the
version manually.
This was causing an issue an invalid regex. Now we are escapeing the
text to make it a valid regex.
There is also a small improvement where we no longer try and highlight
matched words if the "text" is empty.
Ref: #26
Now you can open the currently selected item in a vertical split or a
horizontal split. The completion callback must support the current
actions.
There is also a bit of testing in here. The vim mock has been refactored
and split out so we can use it multiple tests.
When you complete a completion the completion window is no longer
activated after the callback is run. This was causing issues with the
incorrect window being active after the completion.
This will lead the way for more actions other then edit, that will be
comming soon.
Fixes-issue: #8
This adds dot files into the finder. We are adding the overrides to the
`ignore` package, that can be used later to add custom ignore
directories that can be passed in as settings.
We are also adding a new `ivy_cwd` function to libivy to get the current
directory due to the limitations of lua.
Fixes-issue: #16
The API for `window.set_items` took to many variable types. It would
take a table in multiple different formats and a string. Now it will
only take a table in a single format and a string. It will convert the
string into the table format by splitting it on new lines.
The table format is an array of tables that must have a `content` key
that will be the text that is displayed in the completion window. The
table can have any other data that is ignored.
```lua
local items = {
{ content = "Item one" },
{ content = "Item two" }
}
```
The `set_items` function will only display the `content` key in the
completion window, it will not do any sorting or filtering, that must be
done before passing the data to the `set_items` function.