From efbfa36915676f58ebd0a550fe97386177038823 Mon Sep 17 00:00:00 2001 From: vyfor Date: Fri, 10 Jan 2025 14:55:23 +0500 Subject: [PATCH] docs(wiki): fix inconsistencies --- .github/wiki/Configuration.md | 1 + ...d-or-change-file-icons.md => File-Icons.md} | 18 +++++++++--------- .github/wiki/Home.md | 12 ++++++------ .github/wiki/Migration.md | 6 +++--- .github/wiki/Troubleshooting.md | 2 +- .github/workflows/wiki.yml | 1 + README.md | 10 +++++----- 7 files changed, 26 insertions(+), 24 deletions(-) rename .github/wiki/{Add-or-change-file-icons.md => File-Icons.md} (59%) diff --git a/.github/wiki/Configuration.md b/.github/wiki/Configuration.md index 616a0574..917d5c9c 100644 --- a/.github/wiki/Configuration.md +++ b/.github/wiki/Configuration.md @@ -211,6 +211,7 @@ buttons = { ### Assets Override icons and text for specific filetypes or filenames. Most of the options also support functions. +See ```lua assets = { diff --git a/.github/wiki/Add-or-change-file-icons.md b/.github/wiki/File-Icons.md similarity index 59% rename from .github/wiki/Add-or-change-file-icons.md rename to .github/wiki/File-Icons.md index 631cb6cc..043b33e7 100644 --- a/.github/wiki/Add-or-change-file-icons.md +++ b/.github/wiki/File-Icons.md @@ -12,15 +12,15 @@ require('cord').setup { ## Icon Configuration Options -| Option | Type | Description | -| ----------- | ----------------- | ------------------------------------------------------------------------------------------------------------ | -| **(key)** | `string` | The key can be a Vim filetype (like `lua`), a filename (like `Cargo.toml`), or a file extension (like `.rs`) | -| **(value)** | `string \| table` | This can either be a string pointing to the icon or a table with options below | -| `icon` | `string` | A direct URL to the icon image or the name of the rich presence asset (in case you use your own application) | -| `tooltip` | `string` | Text that appears when hovering over the icon | -| `name` | `string` | An optional override for the icon name. Redundant for `language` types | -| `text` | `string` | An optional override for the icon text. Unlike other options, this will fully override the text | -| `type` | `string` | Specifies the context of the asset. | +| Option | Type | Description | +| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------ | +| **(key)** | `string` | The key can be a Vim filetype (like `lua`), a filename (like `Cargo.toml`), or a file extension (like `.rs`) | +| **(value)** | `string \| table` | This can either be a string pointing to the icon or a table with options below | +| `icon` | `string \| function ` | A direct URL to the icon image or the name of the rich presence asset (in case you use your own application) | +| `tooltip` | `string \| function` | Text that appears when hovering over the icon | +| `name` | `string \| function` | An optional override for the icon name. Redundant for `language` types | +| `text` | `string \| function` | An optional override for the icon text. Unlike other options, this will fully override the text | +| `type` | `string` | Specifies the context of the asset. | Available types: - `language` (default) diff --git a/.github/wiki/Home.md b/.github/wiki/Home.md index c3f5c834..6e30f5f8 100644 --- a/.github/wiki/Home.md +++ b/.github/wiki/Home.md @@ -1,8 +1,8 @@ Welcome to the **cord.nvim** wiki! -- [Migration from v1](Migration) -- [Configuration](Configuration) -- [Examples](Examples.md) -- [Add or change file icons](Add-or-change-file-icons) -- [Troubleshooting](Troubleshooting) -- [Contributing](Contributing) \ No newline at end of file +- [Migrating from v1](https://github.com/vyfor/cord.nvim/wiki/Migration) +- [Configuration](https://github.com/vyfor/cord.nvim/wiki/Configuration) +- [Examples](https://github.com/vyfor/cord.nvim/wiki/Examples) +- [Add or Change File Icons](https://github.com/vyfor/cord.nvim/wiki/File-Icons) +- [Troubleshooting](https://github.com/vyfor/cord.nvim/wiki/Troubleshooting) +- [Contributing](https://github.com/vyfor/cord.nvim/wiki/Contributing) \ No newline at end of file diff --git a/.github/wiki/Migration.md b/.github/wiki/Migration.md index e8762c22..55a2bfd4 100644 --- a/.github/wiki/Migration.md +++ b/.github/wiki/Migration.md @@ -27,7 +27,7 @@ The plugin in question, **cord.nvim**, has been rewritten from scratch with a ne The config structure has been updated to be more flexible. Most notably, the majority of string options now support functions, giving you full control over the Rich Presence display. Additionally, a new `variables` option has been introduced to allow custom dynamic values in text templates. > [!NOTE] -> Full configuration options can be found [here](Configuration.md). +> Full configuration options can be found [here](https://github.com/vyfor/cord.nvim/wiki/Configuration). ### Changed Options ```lua @@ -71,7 +71,7 @@ Several built-in features have been removed in favor of customization through fu - Problem count - ToggleTerm handling -These can now be implemented using hooks and custom functions. See [examples](Examples.md). +These can now be implemented using hooks and custom functions. See [examples](https://github.com/vyfor/cord.nvim/wiki/Examples). ## 🎨 Function-Based Customization @@ -115,4 +115,4 @@ assets = { } ``` -More information can be found in the [Configuration Guide](Configuration.md). \ No newline at end of file +More information can be found in the [Configuration Guide](https://github.com/vyfor/cord.nvim/wiki/Configuration). \ No newline at end of file diff --git a/.github/wiki/Troubleshooting.md b/.github/wiki/Troubleshooting.md index b430a3ee..dc45552f 100644 --- a/.github/wiki/Troubleshooting.md +++ b/.github/wiki/Troubleshooting.md @@ -3,7 +3,7 @@ ### Rich Presence is not shown in Discord 1. Ensure that `cord.nvim` is loaded (try running a user command, e.g. `:Cord status`) 2. Confirm that your Activity Privacy settings are [enabled](https://github.com/vyfor/cord.nvim/assets/92883017/c0c8c410-e90e-425e-bf10-8b59f04f15ce) -3. Set [`advanced.plugin.log_level`](./Configuration.md#️-advanced) to `vim.log.levels.TRACE` and check `:messages` for logs +3. Set [`advanced.plugin.log_level`](https://github.com/vyfor/cord.nvim/wiki/Configuration#️-advanced) to `vim.log.levels.TRACE` and check `:messages` for logs 4. Verify that the Discord IPC pipe exists: **Windows:** diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml index 78c9d898..c5b2ce91 100644 --- a/.github/workflows/wiki.yml +++ b/.github/workflows/wiki.yml @@ -24,4 +24,5 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} path: .github/wiki + preprocess: true strategy: init \ No newline at end of file diff --git a/README.md b/README.md index c3901c6d..3fd176a4 100644 --- a/README.md +++ b/README.md @@ -134,14 +134,14 @@ Cord features over 70 beautifully designed icons for languages and components wi 👉 [**Explore the Showcase**](https://github.com/vyfor/icons#showcase) ## 📖 Documentation -- [**Configuration Guide**](.github/wiki/Configuration.md): Everything you need to customize Cord. -- [**Examples**](.github/wiki/Examples.md): Creative ways to customize your Discord presence. -- [**Migration Guide**](.github/wiki/Migration.md): Smooth migration from Cord v1. -- [**Wiki**](https://github.com/vyfor/cord.nvim/wiki): Examples, best practices, and FAQs. (Coming soon) +- [**Configuration Guide**](https://github.com/vyfor/cord.nvim/wiki/Configuration): Everything you need to customize Cord. +- [**Examples**](https://github.com/vyfor/cord.nvim/wiki/Examples): Creative ways to customize your Discord presence. +- [**Migration Guide**](https://github.com/vyfor/cord.nvim/wiki/Migration): Smooth migration from Cord v1. +- [**Wiki**](https://github.com/vyfor/cord.nvim/wiki): Examples, best practices, and FAQs. ## 🤝 Contributing We welcome contributions to make Cord even better! -- Check out our [**Contribution Guidelines**](.github/wiki/Contributing.md). +- Check out our [**Contribution Guidelines**](https://github.com/vyfor/cord.nvim/wiki/Contributing). ## ❓ FAQ Have questions or issues?