From 325f239c1b8761ba1d1916a499abb44950863147 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 7 Jan 2024 10:03:48 +0800 Subject: [PATCH] docs: complete `tab::Tab` --- docs/plugin/api.md | 65 +++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/docs/plugin/api.md b/docs/plugin/api.md index b2f5c0d5..88794180 100644 --- a/docs/plugin/api.md +++ b/docs/plugin/api.md @@ -331,13 +331,13 @@ prompting plugin developers to create separate namespaces for their plugins to p ### `tab::Mode` -Visual mode status of the current tab. +Visual mode status. Properties: -- `is_select`: Whether the current tab is in select mode -- `is_unset`: Whether the current tab is in unset mode -- `is_visual`: Whether the current tab is in select or unset mode +- `is_select`: Whether the mode is select +- `is_unset`: Whether the mode is unset +- `is_visual`: Whether the mode is select or unset Methods: @@ -353,27 +353,31 @@ TODO Properties: -- sort_by -- sort_sensitive -- sort_reverse -- sort_dir_first -- linemode -- show_hidden +- `sort_by` +- `sort_sensitive` +- `sort_reverse` +- `sort_dir_first` +- `linemode` +- `show_hidden` ### `tab::Preview` +TODO + Properties: -- skip -- folder +- `skip` +- `folder` -### `manager::Tabs` +### `folder::Folder` -TODO +### `folder::Files` + +### `manager::Tabs` Properties: -- idx +- `idx`: The index of the active tab Meta methods: @@ -382,27 +386,36 @@ Meta methods: ### `tab::Tab` -TODO - Properties: -- mode -- conf -- parent -- current -- preview +- `mode`: The [tab::Mode](#tabmode) of this tab +- `conf`: The [tab::Config](#tabconfig) of this tab +- `parent`: The parent folder within this tab, which is a [folder::Folder](#folderfolder) +- `current`: The current folder within this tab, which is a [folder::Folder](#folderfolder) +- `preview`: The [tab::Preview](#tabpreview) within this tab Methods: -- name() +- `name()`: The name of this tab ### `tasks::Tasks` -TODO - Properties: -- progress +- `progress`: The progress of all tasks, which is a table: + + ```lua + { + -- Number of tasks + total = 0, + succ = 0, + fail = 0, + + -- Workload of tasks + found = 0, + processed = 0, + } + ``` ## Isolate context