Skip to content

Commit

Permalink
docs: v0.4 previewer job table changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Dec 25, 2024
1 parent 1ba50ac commit ba01d90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/configuration/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ If neither `[path]` nor `--current` is specified, will use the startup directory
| --------------- | ----------------------------------------------- |
| `[n]` | Close the tab at position `n`, starting from 0. |

If you want to close the current tab, use the [`close`](/docs/configuration/keymap/#manager.close) command instead.

### `tab_switch` {#manager.tab_switch}

| Argument/Option | Description |
Expand Down
15 changes: 8 additions & 7 deletions docs/plugins/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ See [Async context](/docs/plugins/overview#async-context).
Preview the file as code into the specified area:

- `opts`: Required, the options of the preview, which is a table:
- `file`: The previewed [File](/docs/plugins/types#shared.file).
- `area`: The area of the preview, which is a [Rect](/docs/plugins/layout#rect).
- `skip`: The number of units to skip. It's units largely depend on your previewer, such as lines for code, and percentages for videos.
- `window`: The [Window](/docs/plugins/types#shared.window) of the preview.
- `area`: [Rect](/docs/plugins/layout#rect) of the available preview area.
- `file`: [File](/docs/plugins/types#shared.file) to be previewed.
- `mime`: String of the MIME type of the file.
- `skip`: Number of units to skip. The units depend on your previewer, such as lines for code and percentages for videos.

Returns `(err, upper_bound)`:

Expand All @@ -224,9 +224,10 @@ This function is only available in the async context.
### `preview_widgets(opts, widgets)` {#ya.preview_widgets}

- `opts`: Required, the options of the preview, which is a table:
- `file`: The previewed [File](/docs/plugins/types#shared.file).
- `skip`: The number of units to skip. It's units largely depend on your previewer, such as lines for code, and percentages for videos.
- `window`: The [Window](/docs/plugins/types#shared.window) of the preview.
- `area`: [Rect](/docs/plugins/layout#rect) of the available preview area.
- `file`: [File](/docs/plugins/types#shared.file) to be previewed.
- `mime`: String of the MIME type of the file.
- `skip`: Number of units to skip. The units depend on your previewer, such as lines for code and percentages for videos.
- `widgets`: List of renderable widgets, such as `{ ui.Text {...}, ui.List {...}, ... }`.

This function is only available in the async context.
Expand Down

0 comments on commit ba01d90

Please sign in to comment.