No description
Find a file
Ade Attwood acbf91d0dc test: add hooks to test scripts
Now you can use `before` `before_each` `after` and `after_each`. Each of
the hooks will run in the context of the test file.

`before` This will run once before all the tests
`before_each` This will run before each of the test functions
`after` Will run once after all the test functions
`after_each` Will run after each one of the test functions

Multiple functions can be defined for each hook by calling the
respective function again.
2022-08-06 14:16:12 +01:00
.github/workflows ci: add test and build actions 2022-08-06 10:45:04 +01:00
cpp fix: reverse the order of results 2022-07-23 09:00:51 +01:00
lua/ivy test: a test script and some tests 2022-08-06 10:45:04 +01:00
plugin feat: add highlight on matching chars in results buffer 2022-07-23 20:53:07 +01:00
scripts test: add hooks to test scripts 2022-08-06 14:16:12 +01:00
.clang-format feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
.clang-tidy feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
.gitignore feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
.luacheckrc chore: initial commit 2022-07-10 21:07:33 +01:00
.stylua.toml chore: initial commit 2022-07-10 21:07:33 +01:00
CMakeLists.txt feat: add initial implementation of cpp file finder 2022-07-23 08:49:45 +01:00
README.md feat: implement IvyLines to search the lines in the current buffer 2022-07-23 20:30:14 +01:00

ivy.nvim

An ivy-mode port to neovim. Ivy is a generic completion mechanism for Emacs Nvim

Installation

Manually

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.

cmake -DCMAKE_BUILD_TYPE=Release -B build/Release && (cd build/Release; make -j)

If you are missing build dependencies, you can install them via apt.

sudo apt-get install build-essential pkg-config cmake

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

API

  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
  )

Other stuff you might like

  • ivy-mode - An emacs package that was the inspiration for this nvim plugin
  • Command-T - Vim plugin I used before I started this one
  • telescope.nvim - Another competition plugin, lots of people are using