-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwf.txt
198 lines (167 loc) · 6.27 KB
/
wf.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
==============================================================================
------------------------------------------------------------------------------
*wf.nvim*
A modern which-key like plugin for neovim
# Getting started~
Getting started with wf.nvim:
1. Put a `require('wf').setup()` call somewhere in your neovim config.
2. Read |wf.setup| to check what config keys are aviable and what you can put
inside the setup call
3. Read |wf.builtin| to check which builtin pickers are offered and what
options these implement
4. Profit
# Keymapping~
The default key assignments are shown in the table below.
tag char action
*i_CTRL-T* CTRL-T Toggle the which-key with fuzzy-finder
*n_CTRL-T* CTRL-T Toggle the which-key with fuzzy-finder
*n_<ESC>* <ESC> Quit wf.nvim
*n_CTRL-C* CTRL-C Quit wf.nvim
------------------------------------------------------------------------------
*wf.select*
`select`({items}, {opts}, {on_choice})
Parameters ~
{items} items
{opts} WFOptions
{on_choice} `(fun(string, table)|fun(num,)` table)
Usage ~
`require("wf").select(items, opts, on_choice)`
==============================================================================
------------------------------------------------------------------------------
*wf.setup*
`setup`({opts})
Parameters ~
{opts} `(optional)` WFConfig
==============================================================================
------------------------------------------------------------------------------
*wf.builtin.bookmark*
`bookmark`({bookmark_dirs}, {opts})
Usage ~
bookmark({nvim="~/.config/nvim", zsh="~/.zshrc"})
Parameters ~
{bookmark_dirs} `(table)`
{opts} `(optional)` WFOptions
==============================================================================
------------------------------------------------------------------------------
*wf.builtin.buffer*
`buffer`({opts})
Parameters ~
{opts} `(optional)` WFOptions
==============================================================================
------------------------------------------------------------------------------
*wf.builtin.mark*
`mark`({opts})
Parameters ~
{opts} `(optional)` WFOptions
==============================================================================
------------------------------------------------------------------------------
*wf.builtin.register*
`register`({opts})
Parameters ~
{opts} `(optional)` WFOptions
==============================================================================
------------------------------------------------------------------------------
*wf.builtin.which_key*
`which_key`({opts})
Parameters ~
{opts} `(optional)` WFOptions
==============================================================================
------------------------------------------------------------------------------
Class ~
{hl_group} string Highlight group name, e.g. "ErrorMsg"
------------------------------------------------------------------------------
Class ~
{WFkeymaps}
Fields ~
{escape} `(string)`
{toggle} `(string)`
------------------------------------------------------------------------------
Class ~
{WFHighlight}
Fields ~
{WFNormal} hl_group
{WFFloatBorder} hl_group
{WFFloatBorderFocus} hl_group
{WFComment} hl_group
{WFWhichRem} hl_group
{WFWhichOn} hl_group
{WFFuzzy} hl_group
{WFFuzzyPrompt} hl_group
{WFFocus} hl_group
{WFFreeze} hl_group
{WFWhichObjCounter} hl_group
{WFWhichDesc} hl_group
{WFSeparator} hl_group
{WFGroup} hl_group
{WFWhichUnique} hl_group
{WFExpandable} hl_group
{WFTitleOutput} hl_group
{WFTitleWhich} hl_group
{WFTitleFuzzy} hl_group
{WFTitleFreeze} hl_group
------------------------------------------------------------------------------
Class ~
{WFConfig}
Fields ~
{theme} `(optional)` "default"|"space"|"chad"
{highlight} `(optional)` WFHighlight
{builtin_keymaps} WFkeymaps
------------------------------------------------------------------------------
Class ~
{WFBehavior}
Fields ~
{skip_front_duplication} `(boolean)`
Example:
When there are two lines:
`|123k123`
`|123l123`
then the prefix match is skipped:
`123|k123`
`123|l123`
{skip_back_duplication} `(boolean)`
Example:
When there are two lines:
`123`
`123k|j`
At this time, the candidate is uniquely determined, so confirm the candidate before pressiong `j`.
------------------------------------------------------------------------------
Class ~
{Cell}
Fields ~
{key} `(string)`
{id} `(string)`
{text} `(string)`
{type} "key"|"group"
------------------------------------------------------------------------------
Class ~
{Chunks}
list of [text, hl_group] arrays, each representing a text chunk with specified highlight. hl_group element can not be omitted for not
------------------------------------------------------------------------------
Class ~
{WFStyle}
Fields ~
{border} `(string)`
of window border. This can either be a string or an array.
nvim_open_win
{borderchars} `(table)` @field top center bottom
array will specifify the eight chars building up the border in a clockwise fashion starting with the top-left corner.
nvim_open_win
{icons} `(table)` @field separator fuzzy_prompt which_prompt
{input_win_row_offset} `(number)` The width for shift up output-window's row with input-window's height.
number a width for windows
------------------------------------------------------------------------------
Class ~
{WFOptions}
Fields ~
{title} `(string?)`
{selector} "which"|"fuzzy"
{text_insert_in_advance} `(string)`
{key_group_dict} `(table)`
Usage ~
key_group_dict = { "<leader>l"="vimtex", "<leader>e"="conjure" }
{prefix_size} `(number)`
{sorter} `(function)`
{behavior} WFBehavior
{output_obj_which_mode_desc_format} `(fun(match_obj:Cell[]):Chunks)`
{style} WFStyle
vim:tw=78:ts=8:noet:ft=help:norl: