summaryrefslogtreecommitdiffstats
path: root/lua/inbox/types.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/inbox/types.lua')
-rw-r--r--lua/inbox/types.lua26
1 files changed, 12 insertions, 14 deletions
diff --git a/lua/inbox/types.lua b/lua/inbox/types.lua
index 4a7efe9..3913699 100644
--- a/lua/inbox/types.lua
+++ b/lua/inbox/types.lua
@@ -1,6 +1,5 @@
----@class inbox.Config
+---@class inbox.Config: inbox.Indexer.Config
---@field default_maildir string|nil
----@field indexer_config inbox.Indexer.Config|nil
---@field buf_options table|nil
---@field win_options table|nil
---@field filters table<inbox.ContentType, inbox.PartFilter[]>
@@ -8,6 +7,17 @@
---@field flags table<string, table>
---@field headers inbox.HeaderKey[]
+---@class inbox.Indexer
+---@field setup? fun(opts: table)
+---@field available? fun(): boolean
+---@field index? fun(maildir: string, cb: fun(ids: string[], entries: inbox.Summary[], signs: (string | integer)[][]), opts?: table)
+---@field get_entry? fun(id: string): inbox.Entry|nil
+---@field get_parts? fun(id: string): inbox.ContentType[]
+
+---@class inbox.Indexer.Config
+---@field indexer string|nil
+---@field indexer_config table|nil
+
---@class inbox.PartFilter
---@field command string
---@field args string[]
@@ -24,18 +34,6 @@
---| "text/html"
---| string
----@class inbox.Indexer
----@field setup? fun(opts: table)
----@field available? fun(): boolean
----@field index? fun(maildir: string, cb: fun(ids: string[], entries: inbox.Summary[], signs: (string | integer)[][]), opts?: table)
----@field get_entry? fun(id: string): inbox.Entry|nil
----@field get_parts? fun(id: string): inbox.ContentType[]
-
----@alias inbox.Indexer.Config
----| "notmuch"
----| string
----| table
-
---@class inbox.Summary
---@field tags string[]
---@field date string