#discord-rich-presence #discord #rich-presence #neovim #discord-rpc #plugin

nightly app cord-nvim

🚀 The most extensible Discord Rich Presence plugin for Neovim, powered by Rust

40 releases (5 stable)

new 2.1.0 Feb 25, 2025
2.0.3 Feb 11, 2025
2.0.0 Jan 31, 2025

#17 in Command line utilities

Download history 345/week @ 2024-12-19 243/week @ 2024-12-26 508/week @ 2025-01-02 1557/week @ 2025-01-09 1435/week @ 2025-01-16 656/week @ 2025-01-23 413/week @ 2025-01-30 144/week @ 2025-02-06 30/week @ 2025-02-13

1,350 downloads per month

Apache-2.0

7MB
7K SLoC

Rust 4K SLoC // 0.0% comments Lua 3K SLoC // 0.1% comments Vim Script 37 SLoC

Contains (ELF exe/lib, 1MB) dist/aarch64-linux-cord, (Mach-o exe, 730KB) dist/aarch64-darwin-cord, (ELF exe/lib, 765KB) dist/i686-bsd-cord, (ELF exe/lib, 1MB) dist/i686-linux-cord, (ELF exe/lib, 780KB) dist/x86_64-bsd-cord, (Mach-o exe, 705KB) dist/x86_64-darwin-cord and 4 more.

🧩 Cord – Tailor Your Presence Like Never Before

Stargazers Neovim Logo Forks

Cord Logo

🚀 The most extensible Discord Rich Presence plugin for Neovim, powered by Rust.

Cord Banner

[!IMPORTANT] Cord no longer requires Rust to be installed. Rust component will be automatically downloaded from GitHub Releases.

💎 Features

  • 🌐 Client-Server Design — Handles multiple Neovim instances with a single connection to Discord.
  • Performance in Mind — Lightweight, dependency-free, with blazingly-fast startup.
  • 🚀 Event-Driven Architecture — Instant presence updates with zero delays.
  • 🎨 Customizable Templates — Dynamic string templates with custom variables.
  • 🔧 Unmatched Configurability — Function-based configuration for infinite customization possibilities.
  • 🧠 Automated State Handling — Automatically manages activities across all instances.
  • 💤 Smart Idle Detection — Identifies idle sessions and switches to the most recent non-idle session.
  • 🛠️ Built-in Git Integration — Detects repositories and workspaces based on VCS files without relying on command-line tools.
  • 🗃️ Custom Assets — Extendable with fully customizable assets for any file/buffer type.
  • ⚙️ Robust User Commands - Quickly manage Cord and its features through user commands and easily create your own keybindings.
  • 🔌 Plugin System — Extendable with custom plugins, with a plethora of built-in ones out of the box.
  • 📦 Wide Compatibility - Compatible with various Discord installations (Snap, Flatpak) and able to work inside WSL and Discord in browser.
  • 🌍 Cross-Platform — Supports Windows, Linux, macOS, and FreeBSD.
  • 🌸 Rich Icon Collection — Features 120+ uniquely designed themed icons for 200+ file types and plugins.
  • 🔁 Automatic Reconnection — Able to reconnect to Discord if the connection is lost.

📦 Quick Start

For most users, the quickest way to get started is using lazy.nvim:

{
  'vyfor/cord.nvim',
  build = ':Cord update',
  -- opts = {}
}

Considerations

Expand

Cord requires the server executables to be present. To get it, you can either:

Installation

Using packer.nvim
use {
  'vyfor/cord.nvim',
  run = ':Cord update',
  -- config = function()
  --   require('cord').setup {}
  -- end
}
Using rocks.nvim

Cord is available on LuaRocks.

:Rocks install cord.nvim

Invoke :Cord update whenever the plugin is updated.

Using Vim packages

Unix:

git clone https://github.com/vyfor/cord.nvim ~/.local/share/nvim/site/pack/plugins/start/cord.nvim

Windows:

git clone https://github.com/vyfor/cord.nvim $LOCALAPPDATA/nvim-data/site/pack/plugins/start/cord.nvim

Invoke :Cord update whenever the plugin is updated.

Other

Invoke :Cord update whenever the plugin is updated.

🎨 Themes

Cord boasts over 120 meticulously crafted icons for languages and tools, available in distinct themes to match your style.

👉 Explore the Icon Showcase: vyfor/icons

Currently, Cord offers two themes:

  • Onyx: A sleek, modern dark theme (default).
  • Pastel: A vibrant, accent-colored theme.

Choose your theme in the display.theme configuration option. More themes are coming soon!

📖 Documentation

Dive deeper into Cord's features and customization options in the Wiki:

  • 📘 Configuration Guide: Master all the settings to tailor Cord to your exact needs.
  • 💡 Examples: Get inspired with creative ways to customize your Discord presence.
  • ⚙️ Migration Guide: Upgrade smoothly from Cord v1.
  • FAQ: Frequently asked questions about Cord.
  • 🚑 Troubleshooting Guide: Find solutions to common issues and scenarios.

🤝 Contributing

We welcome contributions to make Cord even better!

❤️ Support the Project

I'm the sole maintainer of cord.nvim and dedicate much of my free time to this project. If you find Cord helpful, you can show your support by giving the repo a star or sponsoring me on GitHub. Every bit of support helps me continue to improve and maintain Cord for everyone. Thank you!

🛠️ Build From Source

[!NOTE] Make sure you have Rust >= 1.85.0 installed.

To build Cord from source, you can run :Cord update build (async) which will install the server binary from crates.io by running the following command:

cargo install --path . --root path/to/nvim-data-dir/cord --force

Alternatively, you can use cargo b --release to build the binary, then place it under nvim-data-dir/cord/bin.


💬 Questions? Post in Discussions or reach me out on Discord: vyfor

cord.nvim

No runtime deps