/fruzzy

Freaky fast fuzzy finder for neovim (denite.nvim matcher) for vim/neovim

Primary LanguagePython

Freaky fast fuzzy finder (Denite matcher) for vim/neovim

Installation

In your .vimrc:

" vim-plug; for other plugin managers, use what's appropriate
Plug 'raghur/fruzzy'

" optional - but recommended - see below
let g:fruzzy#usenative = 1

" tell denite to use this matcher by default for all sources
call denite#custom#source('_', 'matchers', ['matcher/fruzzy'])

Native modules

Native module gives a 10 - 15x speedup over python - ~40-60μs!. Not that you’d notice it in usual operation (python impl is at 300 - 600μs)

  1. Download module from Releases and copy (on linux x64 - fruzzy.so, on windows x64 - fruzzy.pyd) to <path/to/fruzzy/rplugin/python3

  2. restart nvim

    • I’ll try my hand at automated install - but don’t hold your breath.

Development

Running tests
  1. Clone

  2. cd rplugin/python3

  3. pytest - run tests with python implementation

  4. FUZZY_CMOD=1 pytest - run tests with native module

Build native module
  1. install nim devel (0.18 and 0.18.1 will not work)

  2. dependencies

    1. nimble install binaryheap

    2. nimble install nimpy

  3. [Windows] nim c --app:lib --out:fruzzy_mod.pyd -d:release -d:removelogger fruzzy_mod

  4. [Linux] nim c --app:lib --out:fruzzy_mod.so -d:release -d:removelogger fruzzy_mod

  5. -d:removelogger

    • removes all log statements from code.

    • Without this symbol defined, you will get info level logging.

    • If you remove -d:release you will also get debug level logging

TODOS

  1. Ctrlp compat