Skip to content

Only for archival - see raghur/fruzzy for something that actually works well

License

Notifications You must be signed in to change notification settings

raghur/fuzzy-denite

Repository files navigation

Fuzzy Denite

Go Fuzzy find server and denite.nvim custom matcher client.

Installation

Then in your .vimrc:

Plug 'Shougo/denite.nvim'
Plug 'raghur/fuzzy-denite', {'do': ':FuzzyDeniteInstall'}

call denite#custom#source('_', 'matchers', ['matcher/gofuzzy'])

Why

I currently use nixprime/cpsm and while it’s great, it’s a pain to set up on windows and Linux since the python extension has to be compiled separately. This isn’t a problem on Linux - but on Windows - :O :O.

I wanted to try my hand at writing something that works reasonably well and is comparatively easy to set up.

How

A special purpose, stateful server on localhost that listens for connections and responds with matches.

Speed

So you might be thinking that out of process, network api call vs C extension? So did I. But, a few tweaks and I can’t really tell the difference that much

  1. The list of things to be filtered is sent at best once. A hash is calculated on the client and the list to be filtered is sent only if the server doesn’t already have it.

  2. GRPC for comms - much faster than pickling or HTTP. It makes installation of the plugin a little more involved since pip has to be run on installation but the it’s worth the trouble for the speed up and no lag experience

  3. I use NeoMRU a lot - it has a limit of 1000 entries. Turning this down to 100 makes is more reasonable.

Goals

  1. Fast - no pause, no hiccups

  2. Relevant matching - esp filenames/paths - right now, this isn’t great, but a lot easier to improve

  3. Easy installation - esp no pip dependencies on the python client.

TODOS

  1. Provide platform binaries so that users don’t need GO SDK

  2. Fix first run 'pause'

  3. Explore using FZF’s fuzzy matching code.