Skip to content

Commit 263ffb2

Browse files
committed
docs: reference hooks as hook instead of callback
1 parent a41fdaf commit 263ffb2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ local config = {
208208
- `guest_cwd`: `string`
209209
- The current working directory of the guest instance.
210210
- `data`: `any`
211-
- The data passed to the host from the `guest_data` callback.
211+
- The data passed to the host from the `guest_data` hook.
212212

213213
- `Flatten.BufInfo`:
214214
- `fname`: `string`
@@ -234,7 +234,7 @@ Defaults are in `flatten.hooks`.
234234

235235
- `Flatten.PreOpenContext`:
236236
- `data`: `any`
237-
- The data passed to the host from the `guest_data` callback.
237+
- The data passed to the host from the `guest_data` hook.
238238

239239
- `hooks.post_open`: `fun(opts: Flatten.PostOpenContext)`
240240
- Called after opening files.
@@ -251,7 +251,7 @@ Defaults are in `flatten.hooks`.
251251
- `is_diff`: `boolean`
252252
- Whether the files were opened in diff mode.
253253
- `data`: `any`
254-
- The data passed to the host from the `guest_data` callback.
254+
- The data passed to the host from the `guest_data` hook.
255255

256256
- `hooks.block_end`: `fun(opts: Flatten.BlockEndContext)`
257257
- Called when the host closes the file.
@@ -260,7 +260,7 @@ Defaults are in `flatten.hooks`.
260260
- `filetype`: `string`
261261
- The filetype of the file that was opened.
262262
- `data`: `any`
263-
- The data passed to the host from the `guest_data` callback.
263+
- The data passed to the host from the `guest_data` hook.
264264

265265
- `hooks.no_files`: `fun(opts: Flatten.NoFilesArgs): Flatten.NoFilesBehavior`
266266
- Called when no files are passed to a guest instance, to determine what to do.
@@ -284,7 +284,7 @@ If you use a toggleable terminal and don't want the new buffer(s) to be opened i
284284

285285
The only reason 'alternate' isn't the default is to avoid breaking people's configs. It may become the default at some point if that's something that people ask for (e.g., open an issue if you want that, or comment on one if it exists).
286286

287-
Note that when opening a file in blocking mode, such as a git commit, the terminal will be inaccessible. You can get the filetype from the bufnr or filetype arguments of the `post_open` callback to only close the terminal for blocking files, and the `block_end` callback to reopen it afterwards.
287+
Note that when opening a file in blocking mode, such as a git commit, the terminal will be inaccessible. You can get the filetype from the bufnr or filetype arguments of the `post_open` hook to only close the terminal for blocking files, and the `block_end` hook to reopen it afterwards.
288288

289289
Here's my setup for toggleterm, including an autocmd to automatically close a git commit buffer on write:
290290

0 commit comments

Comments
 (0)