Skip to content

Commit

Permalink
docs: expand the types supported by the event system
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Apr 19, 2024
1 parent d50a80a commit 710a189
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 6 additions & 5 deletions docs/plugins/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,12 @@ If it truly requires loading multiple files at once, the user needs to be prompt

Yazi's plugin can run concurrently on multiple threads. For better performance, only the following types of combinations can be used for inter-thread data exchange:

- nil
- boolean
- number
- string
- table and nested tables, with the above types as values
- Nil
- Boolean
- Number
- String
- [Url](/docs/plugins/types#shared.url)
- Table and nested tables, with the above types as values

## Debugging {#debugging}

Expand Down
5 changes: 2 additions & 3 deletions docs/plugins/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ Calculate the cached [Url](/docs/plugins/types#shared.url) corresponding to the

If the file is not allowed to be cached, such as it's ignored in the user config, or the file itself is a cache, returns `nil`.

### `manager_emit(cmd, args, data)` {#ya.manager_emit}
### `manager_emit(cmd, args)` {#ya.manager_emit}

Send a command to the [`[manager]`](/docs/configuration/keymap#manager) without waiting for the executor to execute:

- `cmd` - Required, the command name, which is a string
- `args` - Required, the arguments of the command, which is a table with a number key and string/number value, or a string key and string/number/boolean value
- `data` - Optional, additional data passed to the command
- `args` - Required, the arguments of the command, which is a table with a number or string key and [sendable values](/docs/plugins/overview#sendable)

```lua
ya.manager_emit("my-cmd", { "hello", 123, foo = true, bar_baz = "world" })
Expand Down

0 comments on commit 710a189

Please sign in to comment.