Skip to content

Commit c8e6e21

Browse files
committed
docs: fix readme
1 parent 66c8705 commit c8e6e21

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
**fzf-native** is a `c` port of **[fzf][fzf]**. It only covers the algorithm and
44
implements few functions to support calculating the score.
55

6+
This means that the [fzf syntax](https://github.com/junegunn/fzf#search-syntax).
7+
This is an advantage over the more simpler `fzy` algorithm, which is also
8+
available for telescope (as native component or as lua component).
9+
610
## Installation
711

812
To get **fzf-native** working, you need to run make at the root directory. As of
@@ -23,11 +27,13 @@ use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
2327
## Telescope Setup and Configuration:
2428

2529
```lua
30+
-- You dont need to set any of these options. These are the default ones. Only
31+
-- the loading is important
2632
require('telescope').setup {
2733
extensions = {
2834
fzf = {
2935
fuzzy = true, -- false will only do exact matching
30-
override_generic_sorter = false, -- override the generic sorter
36+
override_generic_sorter = true, -- override the generic sorter
3137
override_file_sorter = true, -- override the file sorter
3238
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
3339
-- the default case_mode is "smart_case"
@@ -45,9 +51,6 @@ This section is only addressed towards developers who plan to use the library
4551
(c or lua bindings).
4652
This section is not addressed towards users of the telescope extension.
4753

48-
(**Disclaimer**: Interface is not yet stable. The library is still in
49-
development)
50-
5154
### C Interface
5255

5356
```c
@@ -94,25 +97,24 @@ fzf.free_slab(slab)
9497

9598
## Disclaimer
9699

97-
This project is work in progress and might not be complete compared to
98-
**[fzf][fzf]**. But i think we are at a pretty usable state already.
99-
100-
Another point to mention is that, this will not compare 1:1 with
101-
**[fzf][fzf]**, because telescope handles the sorting, this extension is
102-
only handling the calculation of the score. This means that the order of items
103-
with the same score might be different in telescope compared to **[fzf][fzf]**.
104-
105-
Example for this behaivor is this pattern in this repository: `src | lua`.
106-
All files that match this pattern have the same score which results in a
107-
slightly different order for telescope compared to **[fzf][fzf]**.
100+
This projects implements **[fzf][fzf]** algorithm in c. So there might be
101+
differences in matching. I don't guarantee completeness.
108102

109103
### TODO
110104

111-
Stuff still missing that is present in fzf.
105+
Stuff still missing that is present in **[fzf][fzf]**.
112106

113107
- [ ] normalize
114108
- [ ] case for unicode (i don't think this works currently)
115-
- [ ] and probably more
109+
110+
## Benchmark
111+
112+
Comparison with fzy-native and fzy-lua with a table containing 240201 file
113+
strings. It calculated the score and position (if score > 0) for each of these
114+
strings with the pattern that is listed below:
115+
116+
![benchmark 1](https://raw.githubusercontent.com/wiki/nvim-telescope/telescope.nvim/imgs/bench1.png)
117+
![benchmark 2](https://raw.githubusercontent.com/wiki/nvim-telescope/telescope.nvim/imgs/bench2.png)
116118

117119
## Credit
118120

0 commit comments

Comments
 (0)