From 3a00f41d64fe6b8f88e5cdf210b76a84ddca1122 Mon Sep 17 00:00:00 2001 From: vyfor Date: Fri, 3 Jan 2025 16:56:56 +0500 Subject: [PATCH] docs: update the guides --- wiki/CONFIGURATION.md | 21 +++++++++++---------- wiki/MIGRATION.md | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/wiki/CONFIGURATION.md b/wiki/CONFIGURATION.md index 1ddab953..d32e6e3f 100644 --- a/wiki/CONFIGURATION.md +++ b/wiki/CONFIGURATION.md @@ -75,7 +75,7 @@ require('cord').setup { update = 'fetch', pipe_path = nil, executable_path = nil, - timeout = 60000, + timeout = 300000, }, discord = { reconnect = { @@ -164,7 +164,7 @@ require('cord').setup { | `advanced.server.update` | `string` | `'fetch'` | Default way to acquire the server executable either if the executable is not found or a manual update is requested: `'fetch'` - fetch from GitHub, `'build'` - build from source, `'none'` - no-op | | `advanced.server.pipe_path` | `string \| nil` | `nil` | Custom IPC pipe path | | `advanced.server.executable_path` | `string \| nil` | `nil` | Custom server executable path | -| `advanced.server.timeout` | `number` | `60000` | Server shutdown timeout (ms) | +| `advanced.server.timeout` | `number` | `300000` | Server shutdown timeout (ms) | | `advanced.discord.reconnect.enabled` | `boolean` | `true` | Whether reconnection is enabled. Has minimal impact on performance. | | `advanced.discord.reconnect.interval` | `number` | `5000` | Reconnection interval in milliseconds, 0 to disable | @@ -335,14 +335,15 @@ The `ActivityManager` contains useful methods: ### Activity Options -| Parameter | Type | Description | -| ------------ | -------- | ---------------------------------------------------------------------------------------------------- | -| `type` | `number` | One of 'playing', 'listening', 'watching' | -| `state` | `string` | The user's current state (e.g., "Editing a file"). | -| `details` | `string` | Detailed information about what the user is doing. | -| `timestamps` | `table` | Contains `start` and `end` timestamps for the activity. | -| `assets` | `table` | Defines images and tooltips, including `large_image`, `large_text`, `small_image`, and `small_text`. | -| `buttons` | `array` | Array of objects, each with `label` and `url`, defining interactive buttons in the presence. | +| Parameter | Type | Description | +| ------------ | --------- | ---------------------------------------------------------------------------------------------------- | +| `type` | `number` | One of 'playing', 'listening', 'watching' | +| `state` | `string` | The user's current state (e.g., "Editing a file"). | +| `details` | `string` | Detailed information about what the user is doing. | +| `timestamps` | `table` | Contains `start` and `end` timestamps for the activity. | +| `assets` | `table` | Defines images and tooltips, including `large_image`, `large_text`, `small_image`, and `small_text`. | +| `buttons` | `array` | Array of objects, each with `label` and `url`, defining interactive buttons in the presence. | +| `is_idle` | `boolean` | Whether the activity should be considered as idle. | ### Useful Functions diff --git a/wiki/MIGRATION.md b/wiki/MIGRATION.md index 4860dd20..feae53af 100644 --- a/wiki/MIGRATION.md +++ b/wiki/MIGRATION.md @@ -12,7 +12,7 @@ The plugin in question, **cord.nvim**, has been rewritten from scratch with a ne - A new smart idle system has been implemented - you're only shown as idle when all your Neovim instances are actually idle. When an instance goes idle, it automatically switches back to show your most recent active one. -- The plugin is now event-driven, meaning changes are reflected instantly without any polling delays. When all instances disconnect, the server, as well as the connection to Discord, stay alive for a minute (configurable) before shutting down, which helps to avoid rate limiting issues. +- The plugin is now event-driven, meaning changes are reflected instantly without any polling delays. When all instances disconnect, the server, as well as the connection to Discord, stay alive for a little while (configurable) before shutting down, which helps to avoid rate limiting issues. - A new `variables` option allows users to define custom variables, including functions, for dynamic text templates. This enhances the flexibility and customization of the Rich Presence display.