@@ -205,7 +205,7 @@ WINDOW ~
205
205
- `guest_cwd``string `
206
206
- The current working directory of the guest instance.
207
207
- `data``any`
208
- - The data passed to the host from the `guest_data` callback .
208
+ - The data passed to the host from the `guest_data` hook .
209
209
- `Flatten.BufInfo`
210
210
- `fname``string `
211
211
- `bufnr ``integer`
@@ -227,7 +227,7 @@ Defaults are in `flatten.hooks`.
227
227
- Called before opening files.
228
228
- `Flatten.PreOpenContext`
229
229
- `data``any`
230
- - The data passed to the host from the `guest_data` callback .
230
+ - The data passed to the host from the `guest_data` hook .
231
231
- `hooks.post_open` `fun(opts: Flatten.PostOpenContext)`
232
232
- Called after opening files.
233
233
- `Flatten.PostOpenContext`
@@ -242,14 +242,14 @@ Defaults are in `flatten.hooks`.
242
242
- `is_diff``boolean `
243
243
- Whether the files were opened in diff mode.
244
244
- `data``any`
245
- - The data passed to the host from the `guest_data` callback .
245
+ - The data passed to the host from the `guest_data` hook .
246
246
- `hooks.block_end` `fun(opts: Flatten.BlockEndContext)`
247
247
- Called when the host closes the file.
248
248
- `Flatten.BlockEndContext`
249
249
- `filetype ``string `
250
250
- The filetype of the file that was opened.
251
251
- `data``any`
252
- - The data passed to the host from the `guest_data` callback .
252
+ - The data passed to the host from the `guest_data` hook .
253
253
- `hooks.no_files` `fun(opts: Flatten.NoFilesArgs): Flatten.NoFilesBehavior`
254
254
- Called when no files are passed to a guest instance, to determine what to do.
255
255
- `Flatten.NoFilesArgs`
@@ -279,8 +279,8 @@ exists).
279
279
280
280
Note that when opening a file in blocking mode, such as a git commit, the
281
281
terminal will be inaccessible. You can get the filetype from the bufnr or
282
- filetype arguments of the `post_open` callback to only close the terminal for
283
- blocking files, and the `block_end` callback to reopen it afterwards.
282
+ filetype arguments of the `post_open` hook to only close the terminal for
283
+ blocking files, and the `block_end` hook to reopen it afterwards.
284
284
285
285
Here’s my setup for toggleterm, including an autocmd to automatically close a
286
286
git commit buffer on write:
0 commit comments