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 @@ -445,4 +445,10 @@ https://github.com/gorbit99/codewindow.nvim
445445 indentation; e.g. useful for Haskell and PureScript, for which treesitter
446446 indentation does not work good
447447
448+ [Adam0](https://github.com/adam01110):
449+
450+ [cord.nvim]: https://github.com/vyfor/cord.nvim
451+
452+ - Add [cord.nvim] plugin in `vim.presence.cord` with `enable` and `setupOpts`
453+
448454<!-- 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-/O+jOaA0PinUiEVILNEF+vUS7Kh3XAwWyFqSvD54rGM=" ;
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.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/0552b44fceedf0c4cba2cd4953d3976633b2509a.tar.gz" ,
382382 "hash" : " sha256-PULc9fiFljpomXDBY1HeJDttImQf7lYprpNEx5MZO4Y="
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" : " 0be090969e978f7442870ef227e09eff7bf3480d" ,
394+ "url" : " https://github.com/vyfor/cord.nvim/archive/0be090969e978f7442870ef227e09eff7bf3480d.tar.gz" ,
395+ "hash" : " sha256-J1Hc38vrltbRQi+ztiMMu1G6z3N1PVtFxQ7qMGsgq00="
396+ },
384397 "crates-nvim" : {
385398 "type" : " Git" ,
386399 "repository" : {
You can’t perform that action at this time.
0 commit comments