File tree Expand file tree Collapse file tree
docs/manual/release-notes
flake/pkgs/by-name/cord-nvim Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ isMaximal: {
299299
300300 presence = {
301301 neocord . enable = false ;
302+ cord-nvim . enable = false ;
302303 } ;
303304 } ;
304305}
Original file line number Diff line number Diff line change @@ -646,4 +646,10 @@ https://github.com/gorbit99/codewindow.nvim
646646
647647- Added `goimports` as supported formatters to `vim.languages.go`.
648648
649+ [Adam0](https://github.com/adam01110):
650+
651+ [cord.nvim]: https://github.com/vyfor/cord.nvim
652+
653+ - Add [cord.nvim] plugin in `vim.presence.cord` with `enable` and `setupOpts`
654+
649655<!-- vim: set textwidth=80: -->
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ pins ,
4+ fetchFromGitHub ,
5+ rustPlatform ,
6+ stdenv ,
7+ vimUtils ,
8+ } : let
9+ pin = pins . cord-nvim ;
10+
11+ pname = "cord" ;
12+ version = pin . revision ;
13+ src = fetchFromGitHub {
14+ inherit ( pin . repository ) owner repo ;
15+ rev = pin . revision ;
16+ sha256 = pin . hash ;
17+ } ;
18+
19+ cord-server = rustPlatform . buildRustPackage {
20+ inherit pname version src ;
21+
22+ postPatch = ''
23+ substituteInPlace .github/server-version.txt \
24+ --replace-fail "2.3.13" "${ version } "
25+ '' ;
26+
27+ cargoHash = "sha256-3/qY+KS6TPyj9IwG2Ade2psqyQX1eTXU/CmxN9j4CyI=" ;
28+
29+ doCheck = false ;
30+
31+ env . RUSTFLAGS = lib . optionalString stdenv . hostPlatform . isDarwin "-C link-arg=-undefined -C link-arg=dynamic_lookup" ;
32+
33+ meta . mainProgram = "cord" ;
34+ } ;
35+ in
36+ vimUtils . buildVimPlugin {
37+ pname = "cord-nvim" ;
38+ inherit version src ;
39+
40+ doCheck = false ;
41+
42+ postPatch = ''
43+ substituteInPlace lua/cord/server/fs/init.lua \
44+ --replace-fail "or M.get_data_path()" "or '${ cord-server } '"
45+
46+ substituteInPlace lua/cord/api/config/init.lua \
47+ --replace-fail "update = 'fetch'," "update = 'none'," \
48+ --replace-fail "auto_update = true," "auto_update = false,"
49+ '' ;
50+
51+ meta = {
52+ description = "Discord rich presence plugin for Neovim" ;
53+ homepage = "https://github.com/vyfor/cord.nvim" ;
54+ license = lib . licenses . asl20 ;
55+ } ;
56+ }
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ lib ,
4+ ...
5+ } : let
6+ inherit ( lib . modules ) mkIf ;
7+
8+ cfg = config . vim . presence . cord-nvim ;
9+ in {
10+ config = mkIf cfg . enable {
11+ vim = {
12+ globals . cord_defer_startup = true ;
13+
14+ lazy . plugins . cord-nvim = {
15+ package = "cord-nvim" ;
16+ setupModule = "cord" ;
17+ inherit ( cfg ) setupOpts ;
18+ event = [ "DeferredUIEnter" ] ;
19+ } ;
20+ } ;
21+ } ;
22+ }
Original file line number Diff line number Diff line change 1+ { lib , ...} : let
2+ inherit ( lib . options ) mkEnableOption ;
3+ inherit ( lib . nvim . types ) mkPluginSetupOption ;
4+ in {
5+ options . vim . presence . cord-nvim = {
6+ enable = mkEnableOption "Discord rich presence [cord.nvim]" ;
7+
8+ setupOpts = mkPluginSetupOption "cord.nvim" { } ;
9+ } ;
10+ }
Original file line number Diff line number Diff line change 1+ {
2+ imports = [
3+ ./config.nix
4+ ./cord-nvim.nix
5+ ] ;
6+ }
Original file line number Diff line number Diff line change 11{
22 imports = [
3+ ./cord-nvim
34 ./neocord
45 ] ;
56}
Original file line number Diff line number Diff line change 5757 # Get plugins built from source from self.packages
5858 # If adding a new plugin to be built from source, it must also be inherited
5959 # here.
60- inherit ( inputs . self . packages . ${ pkgs . stdenv . system } ) blink-cmp avante-nvim ;
60+ inherit ( inputs . self . packages . ${ pkgs . stdenv . system } ) blink-cmp avante-nvim cord-nvim ;
6161 } ;
6262
6363 buildConfigPlugins = plugins :
Original file line number Diff line number Diff line change 381381 "url" : " https://github.com/zbirenbaum/copilot.lua/archive/407349117f176789df6ec1c23bca72f34e15b4e8.tar.gz" ,
382382 "hash" : " sha256-+hQ4Og0ZZS/tvs4z5733qRu5+W4D24HgHHPIL5vd0Eo="
383383 },
384+ "cord-nvim" : {
385+ "type" : " Git" ,
386+ "repository" : {
387+ "type" : " GitHub" ,
388+ "owner" : " vyfor" ,
389+ "repo" : " cord.nvim"
390+ },
391+ "branch" : " master" ,
392+ "submodules" : false ,
393+ "revision" : " b08b9245d2973eda91437d2de5c8746b9f510d31" ,
394+ "url" : " https://github.com/vyfor/cord.nvim/archive/b08b9245d2973eda91437d2de5c8746b9f510d31.tar.gz" ,
395+ "hash" : " sha256-T8HeOSj6IZZa5WfWRGnER+slQ/6OQn0UTLd0zns31b4="
396+ },
384397 "crates-nvim" : {
385398 "type" : " Git" ,
386399 "repository" : {
You can’t perform that action at this time.
0 commit comments