|
15 | 15 | Fall is an abbreviation for "Filter All," another fuzzy finder designed for Vim |
16 | 16 | and Neovim and implemented in [Denops]. |
17 | 17 |
|
18 | | -**Alpha version. Please note that any changes, including those that may be |
19 | | -backward incompatible, will be implemented without prior announcements.** |
| 18 | +> [!WARNING] |
| 19 | +> |
| 20 | +> **Alpha version. Please note that any changes, including those that may be |
| 21 | +> backward incompatible, will be implemented without prior announcements.** |
20 | 22 |
|
21 | 23 | [Denops]: https://github.com/vim-denops/denops.vim |
22 | 24 |
|
23 | 25 | ## Requirements |
24 | 26 |
|
25 | | -Users must install [Deno]. |
| 27 | +Users must install [Deno] version 2.x. Additionally, the `nerdfont` renderer is |
| 28 | +enabled by default so configure your terminal to use a [NerdFont] or disable it |
| 29 | +by removing `builtin.renderer.nerdfont` renderer from the configuration |
| 30 | +(`:FallConfig`). |
26 | 31 |
|
27 | 32 | [Deno]: https://deno.land |
| 33 | +[NerdFont]: https://www.nerdfonts.com |
| 34 | + |
| 35 | +> [!NOTE] |
| 36 | +> |
| 37 | +> Deno version 1.x. is not tested and supported. |
28 | 38 |
|
29 | 39 | ## Installation |
30 | 40 |
|
@@ -59,6 +69,85 @@ Or `line` source with `README.md` as an argument |
59 | 69 | Fall line README.md |
60 | 70 | ``` |
61 | 71 |
|
| 72 | +## Configuration |
| 73 | + |
| 74 | +Use `:FallConfig` command to open the configuration file. The configuration file |
| 75 | +is written in TypeScript. The configuration is reloaded automatically when the |
| 76 | +file is saved. |
| 77 | + |
| 78 | +``` |
| 79 | +FallConfig |
| 80 | +``` |
| 81 | + |
| 82 | +The following is a minimum configuration example. It only defines several |
| 83 | +fundamental pickers as default configurations. |
| 84 | + |
| 85 | +```typescript |
| 86 | +import { type Entrypoint } from "jsr:@vim-fall/std@^0.2.0"; |
| 87 | +import * as builtin from "jsr:@vim-fall/std@^0.2.0/builtin"; |
| 88 | + |
| 89 | +export const main: Entrypoint = ({ |
| 90 | + defineItemPickerFromSource, |
| 91 | + defineItemPickerFromCurator, |
| 92 | +}) => { |
| 93 | + defineItemPickerFromCurator("git-grep", builtin.curator.gitGrep, { |
| 94 | + previewers: [builtin.previewer.file], |
| 95 | + actions: { |
| 96 | + ...builtin.action.defaultOpenActions, |
| 97 | + ...builtin.action.defaultSystemopenActions, |
| 98 | + ...builtin.action.defaultQuickfixActions, |
| 99 | + }, |
| 100 | + defaultAction: "open", |
| 101 | + }); |
| 102 | + |
| 103 | + defineItemPickerFromSource("file", builtin.source.file, { |
| 104 | + matchers: [builtin.matcher.fzf], |
| 105 | + previewers: [builtin.previewer.file], |
| 106 | + actions: { |
| 107 | + ...builtin.action.defaultOpenActions, |
| 108 | + ...builtin.action.defaultSystemopenActions, |
| 109 | + ...builtin.action.defaultQuickfixActions, |
| 110 | + }, |
| 111 | + defaultAction: "open", |
| 112 | + }); |
| 113 | + |
| 114 | + defineItemPickerFromSource("line", builtin.source.line, { |
| 115 | + matchers: [builtin.matcher.fzf], |
| 116 | + previewers: [builtin.previewer.buffer], |
| 117 | + actions: { |
| 118 | + ...builtin.action.defaultOpenActions, |
| 119 | + ...builtin.action.defaultBufferActions, |
| 120 | + ...builtin.action.defaultQuickfixActions, |
| 121 | + }, |
| 122 | + defaultAction: "open", |
| 123 | + }); |
| 124 | + |
| 125 | + defineItemPickerFromSource("buffer", builtin.source.buffer, { |
| 126 | + matchers: [builtin.matcher.fzf], |
| 127 | + previewers: [builtin.previewer.buffer], |
| 128 | + actions: { |
| 129 | + ...builtin.action.defaultOpenActions, |
| 130 | + ...builtin.action.defaultBufferActions, |
| 131 | + ...builtin.action.defaultQuickfixActions, |
| 132 | + }, |
| 133 | + defaultAction: "open", |
| 134 | + }); |
| 135 | + |
| 136 | + defineItemPickerFromSource("help", builtin.source.helptag, { |
| 137 | + matchers: [builtin.matcher.fzf], |
| 138 | + previewers: [builtin.previewer.helptag], |
| 139 | + actions: { |
| 140 | + ...builtin.action.defaultHelpActions, |
| 141 | + }, |
| 142 | + defaultAction: "help", |
| 143 | + }); |
| 144 | +}; |
| 145 | +``` |
| 146 | + |
| 147 | +See |
| 148 | +[`./denops/fall/_assets/default.config.ts`](./denops/fall/_assets/default.config.ts) |
| 149 | +for the full code of the default configuration. |
| 150 | + |
62 | 151 | ## Related Projects |
63 | 152 |
|
64 | 153 | | Repository | Package | Description | |
|
0 commit comments