Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F132259
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/README.md b/README.md
index 7144890..ef817ad 100644
--- a/README.md
+++ b/README.md
@@ -1,135 +1,138 @@
<div align="center">
-# ivy.nvim
+<img src="assets/logo.svg" alt="ivy.vim" />
+
+<br />
+<br />
An [ivy-mode](https://github.com/abo-abo/swiper#ivy) port to neovim. Ivy is a
generic completion mechanism for ~~Emacs~~ Nvim
</div>
## Installation
### Manually
```sh
git clone https://github.com/AdeAttwood/ivy.nvim ~/.config/nvim/pack/bundle/start/ivy.nvim
```
### Plugin managers
TODO: Add docs in the plugin managers I don't use any
### Compiling
For the native searching, you will need to compile the shard library. You can
do that by running the below command in the root of the plugin.
```sh
cargo build --release
```
You will need to have the rust toolchain installed. You can find more about
that [here](https://www.rust-lang.org/tools/install)
If you get a linker error you may need to install `build-essential` to get
`ld`. This is a common issue if you are running the [benchmarks](#benchmarks)
in a VM
```
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
```
## Features
### Commands
A command can be run that will launch the completion UI
| Command | Key Map | Description |
| ---------- | ----------- | ------------------------------------------------------ |
| IvyFd | \<leader\>p | Find files in your project with the fd cli file finder |
| IvyAg | \<leader\>/ | Find content in files using the silver searcher |
| IvyBuffers | \<leader\>b | Search though open buffers |
| IvyLines | | Search the lines in the current buffer |
### Actions
Action can be run on selected candidates provide functionality
| Action | Description |
| -------------- | ------------------------------------------------------------------------------ |
| Complete | Run the completion function, usually this will be opening a file |
| Peek | Run the completion function on a selection, but don't close the results window |
| Vertical Split | Run the completion function in a new vertical split |
| Split | Run the completion function in a new split |
## API
```lua
vim.ivy.run(
-- The name given to the results window and displayed to the user
"Title",
-- Call back function to get all the candidates that will be displayed in
-- the results window, The `input` will be passed in, so you can filter
-- your results with the value from the prompt
function(input) return { "One", "Two", Three } end,
-- Action callback that will be called on the completion or peek actions.
-- The currently selected item is passed in as the result.
function(result) vim.cmd("edit " .. result) end
)
```
## Benchmarks
Benchmarks are of various tasks that ivy will do. The purpose of the benchmarks
are to give us a baseline on where to start when trying to optimize performance
in the matching and sorting, not to put ivy against other tools. When starting
to optimize, you will probably need to get a baseline on your hardware.
There are fixtures provided that will create the directory structure of the
[kubernetes](https://github.com/kubernetes/kubernetes) source code, from
somewhere around commit sha 985c9202ccd250a5fe22c01faf0d8f83d804b9f3. This will
create a directory tree of 23511 files a relative large source tree to get a
good idea of performance. To create the source tree under
`/tmp/ivy-trees/kubernetes` run the following command. This will need to be run
for the benchmarks to run.
```bash
# Create the source trees
bash ./scripts/fixtures.bash
# Run the benchmark script
luajit ./scripts/benchmark.lua
```
Current benchmark status running on a `e2-standard-2` 2 vCPU + 8 GB memory VM
running on GCP.
IvyRs (Lua)
| Name | Total | Average | Min | Max |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 04.153531 (s) | 00.000004 (s) | 00.000003 (s) | 00.002429 (s) |
| ivy_files(kubernetes) 100x | 03.526795 (s) | 00.035268 (s) | 00.021557 (s) | 00.037127 (s) |
IvyRs (Criterion)
| Name | Min | Mean | Max |
| --------------------- | --------- | --------- | --------- |
| ivy_files(kubernetes) | 19.727 ms | 19.784 ms | 19.842 ms |
| ivy_match(file.lua) | 2.6772 µs | 2.6822 µs | 2.6873 µs |
CPP
| Name | Total | Average | Min | Max |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 01.855197 (s) | 00.000002 (s) | 00.000001 (s) | 00.000177 (s) |
| ivy_files(kubernetes) 100x | 14.696396 (s) | 00.146964 (s) | 00.056604 (s) | 00.168478 (s) |
## Other stuff you might like
- [ivy-mode](https://github.com/abo-abo/swiper#ivy) - An emacs package that was the inspiration for this nvim plugin
- [Command-T](https://github.com/wincent/command-t) - Vim plugin I used before I started this one
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - Another competition plugin, lots of people are using
diff --git a/assets/logo.svg b/assets/logo.svg
new file mode 100644
index 0000000..ae94634
--- /dev/null
+++ b/assets/logo.svg
@@ -0,0 +1,5 @@
+<svg width="307" height="78" viewBox="0 0 307 78" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="39" cy="39" r="35" stroke="#FF7D1F" stroke-width="8"/>
+<path d="M37.432 51.704L14.488 41.432V35.048L37.432 24.824V32.024L22.696 38.216L37.432 44.456V51.704ZM40.4099 51.704V44.456L55.0979 38.216L40.4099 32.024V24.824L63.3539 35.048V41.432L40.4099 51.704Z" fill="#FF7D1F"/>
+<path d="M93.92 53V22.088H104.24V53H93.92ZM118.972 53L107.116 22.088H117.868L124.348 40.904L130.876 22.088H141.676L129.772 53H118.972ZM153.034 53V41.72L141.898 22.088H152.65L158.218 32.84L163.786 22.088H174.538L163.354 41.72V53H153.034ZM176.444 53V45.704H184.46V53H176.444ZM187.342 53V22.088H196.03L206.206 36.344V22.088H216.526V53H207.742L197.662 38.792V53H187.342ZM231.285 53L219.429 22.088H230.181L236.661 40.904L243.189 22.088H253.989L242.085 53H231.285ZM256.858 53V22.088H267.178V53H256.858ZM271.014 53V22.088H280.902L287.91 36.344L294.822 22.088H304.71V53H294.39V39.848L290.55 47.72H285.174L281.334 39.848V53H271.014Z" fill="#FF7D1F"/>
+</svg>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, May 8, 4:59 PM (1 w, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8956
Default Alt Text
(6 KB)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment