···8899*local comlink = require*(_"comlink"_)
10101111+*comlink.setup*(_config_)
1212+1113*local conn = comlink.connect*(_config_)
12141315*local channel = comlink.selected_channel*()
···24262527The comlink module is the entrypoint into configuring and scripting comlink.
2628This module provides application level API calls.
2929+3030+*comlink.setup*
3131+ Accepts a configuration table. This table defines the global application
3232+ configuration. The table has the following required fields:
3333+3434+ - *markread_on_focus*: boolean, whether to update unread indicator on
3535+ focus gain
27362837*comlink.connect*
2938 Accepts a configuration table. This table defines the server
+10
docs/comlink.lua
···55---@class comlink
66local comlink = {}
7788+---@class Configuration
99+---
1010+---@field markread_on_focus boolean When true, the unread indicator will be reset when comlink
1111+---regains focus
1212+1313+---Global configuration
1414+---
1515+---@param cfg Configuration Comlink global configuration
1616+function comlink.setup(cfg) end
1717+818---@class ConnectionConfiguration
919---
1020---@field server string The server to connect to, eg "chat.sr.ht"