docs: baked a lot of API docs

This commit is contained in:
Zef Hemel
2026-08-06 14:48:21 +02:00
parent 9b4de31ca3
commit 754e8525b9
36 changed files with 4888 additions and 49 deletions
+44 -1
View File
@@ -8,4 +8,47 @@ references:
The Sync API provides functions for interacting with the sync engine when the client runs in Sync mode.
${spacelua.renderApiDocumentation("sync")}
<!--#lua spacelua.renderApiDocumentation("sync") -->
## sync.hasInitialSyncCompleted
`sync.hasInitialSyncCompleted()`
Checks whether the initial client synchronization has completed.
**Returns:**
- `boolean` — Whether initial sync is complete.
## sync.performFileSync
`sync.performFileSync(path)`
Prioritizes a file for immediate synchronization and waits for completion.
**Parameters:**
- `path` (`string`) — Space-relative file path.
**Example:**
```lua
sync.performFileSync("notes/important.md")
```
## sync.performSpaceSync
`sync.performSpaceSync()`
Starts an immediate full-space synchronization and waits for completion.
**Returns:**
- `number` — Number of sync operations, or zero without an active worker.
**Example:**
```lua
local changes = sync.performSpaceSync()
```
<!--/lua-->