Skip to content

Commit 43b0a01

Browse files
committed
fix: CI and couple issues
1 parent 198ab94 commit 43b0a01

3 files changed

Lines changed: 262 additions & 80 deletions

File tree

README.md

Lines changed: 151 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -62,62 +62,170 @@ FFF.nvim requires:
6262
}
6363
```
6464

65-
#### packer.nvim
65+
## Default Configuration
6666

6767
```lua
68-
use {
69-
'dmtrKovalenko/fff.nvim',
70-
requires = { 'MunifTanjim/nui.nvim' },
71-
run = 'cargo build --release',
72-
config = function()
73-
require("fff").setup()
74-
end
68+
require("fff").setup({
69+
width = 0.8,
70+
height = 0.8,
71+
preview_width = 0.5,
72+
prompt = '🪿 ',
73+
title = 'FFF Files',
74+
max_results = 60, -- Maximum number of search results
75+
max_threads = 4, -- Maximum threads for fuzzy search
76+
77+
keymaps = {
78+
close = '<Esc>',
79+
select = '<CR>',
80+
select_split = '<C-s>',
81+
select_vsplit = '<C-v>',
82+
select_tab = '<C-t>',
83+
move_up = { '<Up>', '<C-p>' },
84+
move_down = { '<Down>', '<C-n>' },
85+
preview_scroll_up = '<C-u>',
86+
preview_scroll_down = '<C-d>',
87+
},
88+
89+
hl = {
90+
border = 'FloatBorder',
91+
normal = 'Normal',
92+
cursor = 'CursorLine',
93+
matched = 'IncSearch',
94+
title = 'Title',
95+
prompt = 'Question',
96+
active_file = 'Visual',
97+
frecency = 'Number',
98+
debug = 'Comment',
99+
},
100+
})
101+
```
102+
103+
### Default Configuration
104+
105+
FFF.nvim comes with sensible defaults. Here's the complete default configuration:
106+
107+
```lua
108+
require("fff").setup({
109+
-- UI dimensions and appearance
110+
width = 0.8, -- Window width as fraction of screen
111+
height = 0.8, -- Window height as fraction of screen
112+
preview_width = 0.5, -- Preview pane width as fraction of picker
113+
prompt = '🪿 ', -- Input prompt symbol
114+
title = 'FFF Files', -- Window title
115+
max_results = 60, -- Maximum search results to display
116+
max_threads = 4, -- Maximum threads for fuzzy search
117+
118+
-- Key mappings (supports both single keys and arrays for multiple bindings)
119+
keymaps = {
120+
close = '<Esc>',
121+
select = '<CR>',
122+
select_split = '<C-s>',
123+
select_vsplit = '<C-v>',
124+
select_tab = '<C-t>',
125+
move_up = { '<Up>', '<C-p>' }, -- Multiple bindings supported
126+
move_down = { '<Down>', '<C-n>' }, -- Multiple bindings supported
127+
preview_scroll_up = '<C-u>',
128+
preview_scroll_down = '<C-d>',
129+
},
130+
131+
-- Highlight groups
132+
hl = {
133+
border = 'FloatBorder',
134+
normal = 'Normal',
135+
cursor = 'CursorLine',
136+
matched = 'IncSearch',
137+
title = 'Title',
138+
prompt = 'Question',
139+
active_file = 'Visual',
140+
frecency = 'Number',
141+
debug = 'Comment',
142+
},
143+
144+
-- Debug options
145+
debug = {
146+
show_scores = false, -- Toggle with F2 or :FFFDebug
147+
},
148+
})
149+
```
150+
151+
### Key Features
152+
153+
#### Multiple Key Bindings
154+
155+
You can assign multiple key combinations to the same action:
156+
157+
```lua
158+
keymaps = {
159+
move_up = { '<Up>', '<C-p>', '<C-k>' }, -- Three ways to move up
160+
close = { '<Esc>', '<C-c>' }, -- Two ways to close
161+
select = '<CR>', -- Single binding still works
75162
}
76163
```
77164

165+
#### Multiline Paste Support
166+
167+
The input field automatically handles multiline clipboard content by joining all lines into a single search query. This is particularly useful when copying file paths from terminal output.
168+
169+
#### Debug Mode
170+
171+
Toggle scoring information display:
172+
173+
- Press `F2` while in the picker
174+
- Use `:FFFDebug` command
175+
- Enable by default with `debug.show_scores = true`
176+
177+
````
178+
78179
#### vim-plug
79180
80181
```vim
81182
Plug 'MunifTanjim/nui.nvim'
82183
Plug 'dmtrKovalenko/fff.nvim', { 'do': 'cargo build --release' }
83-
```
184+
````
185+
186+
## Configuration
84187

85-
### Beta configuration
188+
### Default Configuration
86189

87-
I hope you'll help us to tweak the algorithm and imporve the user experience by sharing your scores and usecasese 🫡
190+
FFF.nvim comes with sensible defaults. Here's the complete default configuration:
88191

89192
```lua
90-
{
91-
"dmtrKovalenko/fff.nvim",
92-
build = "cargo build --release",
93-
config = function()
94-
require("fff").setup({
95-
-- UI configuration
96-
ui = {
97-
width = 0.8,
98-
height = 0.8,
99-
border = "rounded",
100-
},
101-
-- File picker options
102-
picker = {
103-
ignore_patterns = { ".git/", "node_modules/", "target/" },
104-
show_hidden = false,
105-
},
106-
-- Frecency settings
107-
frecency = {
108-
enabled = true,
109-
max_entries = 2000,
110-
},
111-
})
112-
end,
113-
keys = {
114-
{
115-
"<leader>ff",
116-
function()
117-
require("fff").toggle()
118-
end,
119-
desc = "Toggle FFF",
120-
},
193+
require("fff").setup({
194+
-- UI dimensions and appearance
195+
width = 0.8, -- Window width as fraction of screen
196+
height = 0.8, -- Window height as fraction of screen
197+
preview_width = 0.5, -- Preview pane width as fraction of picker
198+
prompt = '🪿 ', -- Input prompt symbol
199+
title = 'FFF Files', -- Window title
200+
max_results = 60, -- Maximum search results to display
201+
max_threads = 4, -- Maximum threads for fuzzy search
202+
203+
keymaps = {
204+
close = '<Esc>',
205+
select = '<CR>',
206+
select_split = '<C-s>',
207+
select_vsplit = '<C-v>',
208+
select_tab = '<C-t>',
209+
move_up = { '<Up>', '<C-p>' }, -- Multiple bindings supported
210+
move_down = { '<Down>', '<C-n>' }, -- Multiple bindings supported
211+
preview_scroll_up = '<C-u>',
212+
preview_scroll_down = '<C-d>',
121213
},
122-
}
214+
215+
hl = {
216+
border = 'FloatBorder',
217+
normal = 'Normal',
218+
cursor = 'CursorLine',
219+
matched = 'IncSearch',
220+
title = 'Title',
221+
prompt = 'Question',
222+
active_file = 'Visual',
223+
frecency = 'Number',
224+
debug = 'Comment',
225+
},
226+
227+
debug = {
228+
show_scores = true, -- We hope for your collaboratio
229+
},
230+
})
123231
```

doc/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)