Commit 747bd2b
authored
feat: findNvim({ paths: ..., dirs: ...}) #400
Problem:
Apps such as https://github.com/vscode-neovim/vscode-neovim use
`findNvim` to find Nvim on the user's system, but:
- they also support user settings to explicitly set a path.
- the app may want to search other directories besides the default ones.
Since `findNvim` currently doesn't allow the caller to provide extra
paths/directories, consumers such as vscode-neovim have to re-invent
their own way to validate those extra paths/directories, which is
redundant with what `findNvim` already does.
Solution:
Introduce `paths: string[]` and `dirs: string[]` options to `findNvim`.1 parent 78100f6 commit 747bd2b
2 files changed
+79
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
8 | 24 | | |
9 | 25 | | |
10 | 26 | | |
| |||
119 | 135 | | |
120 | 136 | | |
121 | 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 | + | |
122 | 164 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
| |||
117 | 134 | | |
118 | 135 | | |
119 | 136 | | |
120 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 145 | | |
128 | 146 | | |
129 | 147 | | |
| |||
147 | 165 | | |
148 | 166 | | |
149 | 167 | | |
| 168 | + | |
150 | 169 | | |
151 | 170 | | |
152 | 171 | | |
| |||
170 | 189 | | |
171 | 190 | | |
172 | 191 | | |
| 192 | + | |
| 193 | + | |
173 | 194 | | |
174 | 195 | | |
175 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
176 | 205 | | |
177 | 206 | | |
178 | 207 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 208 | + | |
| 209 | + | |
182 | 210 | | |
183 | 211 | | |
184 | 212 | | |
| |||
245 | 273 | | |
246 | 274 | | |
247 | 275 | | |
| 276 | + | |
248 | 277 | | |
249 | 278 | | |
0 commit comments