From 710a189d2699e9785f1fbe7fa72ddf596b27a089 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 19 Apr 2024 13:57:50 +0800 Subject: [PATCH] docs: expand the types supported by the event system --- docs/plugins/overview.md | 11 ++++++----- docs/plugins/utils.md | 5 ++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/plugins/overview.md b/docs/plugins/overview.md index 92ceadba..e1b5f742 100644 --- a/docs/plugins/overview.md +++ b/docs/plugins/overview.md @@ -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} diff --git a/docs/plugins/utils.md b/docs/plugins/utils.md index 820f5d22..ecf94ba7 100644 --- a/docs/plugins/utils.md +++ b/docs/plugins/utils.md @@ -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" })