Skip to content

Fork of tzachar/fuzzy.nvim for PRs. You probably want that one.

License

Notifications You must be signed in to change notification settings

d-r-a-b/PR_fork_fuzzy.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

fuzzy.nvim

An abstraction layer on top of fzf and fzy.

Installation

Depends on telescope-fzf-native.nvim or fzy-lua-native.

If both fzf and fzy are installed, will prefer fzf.

Using Packer with fzf:

use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'}
use {'tzachar/fuzzy.nvim', requires = {'nvim-telescope/telescope-fzf-native.nvim'}}

Using Packer with fzy:

use {'romgrk/fzy-lua-native', run = 'make'}
use {'tzachar/fuzzy.nvim', requires = {'romgrk/fzy-lua-native'}}

Api

This plugin supports a module with a single method: filter. The filter method receives three parameters: a pattern to match, a list of strings and an extra parameter passed to the fuzzy library: for fzy, its a boolean indicating is_case_sensitive, for fzf its the case_mode (see this).

The method returns a list of {string, match_positions, score}. For the meanings of match_positions and score see individual documentations of fzf and fzy.

Example Usage

local matcher = require('fuzzy_nvim')
matcher:filter('abc', {'aabbcc', '123', 'a1b2c'})

result with fzf is then: { { "a1b2c", { 5, 3, 1 }, 58 }, { "aabbcc", { 5, 3, 1 }, 49 } }

About

Fork of tzachar/fuzzy.nvim for PRs. You probably want that one.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%