Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins/cord-nvim: init #2408

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Eveeifyeve
Copy link

Adds the cord-nvim plugin.
For more info view the plugin homepage: https://github.com/vyfor/cord.nvim.

fixes: #2373

Note: It's work in progress as I need to do most of the options

@traxys
Copy link
Member

traxys commented Oct 11, 2024

don't feel obligated to add all the options, you can simply add options that are likely to be used by all users of this plugin

@khaneliman
Copy link
Contributor

error: build of '/nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv' on 'ssh-ng://[email protected]' failed: builder for '/nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv' failed with exit code 1;
       last 9 log lines:
       > ERROR: Error detected while processing /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:
       > E5113: Error while calling lua chunk: /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:9: module 'cord-nvim' not found:
       >    no field package.preload['cord-nvim']
       >  no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/share/lua/5.1/cord-nvim.lua'
       >    no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/share/lua/5.1/cord-nvim/init.lua'
       >       no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/lib/lua/5.1/cord-nvim.so'
       > stack traceback:
       >     [C]: in function 'require'
       >     /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:9: in main chunk
       For full logs, run 'nix log /nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv'.

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Oct 11, 2024

error: build of '/nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv' on 'ssh-ng://[email protected]' failed: builder for '/nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv' failed with exit code 1;
       last 9 log lines:
       > ERROR: Error detected while processing /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:
       > E5113: Error while calling lua chunk: /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:9: module 'cord-nvim' not found:
       >    no field package.preload['cord-nvim']
       >  no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/share/lua/5.1/cord-nvim.lua'
       >    no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/share/lua/5.1/cord-nvim/init.lua'
       >       no file '/nix/store/h25v2irfigii5xby44ff7jwfj5sfh06d-luajit-2.1.1713773202-env/lib/lua/5.1/cord-nvim.so'
       > stack traceback:
       >     [C]: in function 'require'
       >     /nix/store/80ylygcwnlkhbmwysfpygb01sbs10p6z-init.lua:9: in main chunk
       For full logs, run 'nix log /nix/store/d7pw4yq7y1bc28l12kf8lkmms7nr8pkr-defaults.drv'.

Yeah still can't figure out how to fix the issue.

@Eveeifyeve
Copy link
Author

Ops.

@khaneliman
Copy link
Contributor

Sorry, I edited my suggestion, Didn't mean to remove the originalName

@Eveeifyeve
Copy link
Author

Dropped the commit.

@Eveeifyeve
Copy link
Author

don't feel obligated to add all the options, you can simply add options that are likely to be used by all users of this plugin

Well I am trying to add all of the options but it shouldn't be too hard to manage as options hasn't been changed in ages.

plugins/by-name/cord-nvim/default.nix Show resolved Hide resolved
plugins/by-name/cord-nvim/default.nix Outdated Show resolved Hide resolved
plugins/by-name/cord-nvim/default.nix Outdated Show resolved Hide resolved
plugins/by-name/cord-nvim/default.nix Outdated Show resolved Hide resolved
plugins/by-name/cord-nvim/default.nix Outdated Show resolved Hide resolved
plugins/by-name/cord-nvim/default.nix Outdated Show resolved Hide resolved
@Eveeifyeve
Copy link
Author

I will work on more of the options tmr I need to sleep.

@Eveeifyeve
Copy link
Author

I didn't have time today but I will look into add more options asap.

@MattSturgeon
Copy link
Member

don't feel obligated to add all the options, you can simply add options that are likely to be used by all users of this plugin

Well I am trying to add all of the options but it shouldn't be too hard to manage as options hasn't been changed in ages.

Just to clarify, the reason we don't need to declare all upstream options is that settings is a "freeform" option.

That means users can configure anything under plugins.*.settings even if we don't declare a corresponding option.

In fact, any options declared actually add additional restrictions due to their type checking. So when we do declare options we must ensure the type is permissive enough to allow users to configure anything upstream may allow.

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Oct 18, 2024

Hey @khaneliman Is it normal for docs not building manual using the docs & serve-docs command in shell?

Logs:

warning: ignoring untrusted substituter 'https://nix-community.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
error: builder for '/nix/store/hk274n3racxlcxzs635c09wz2qd2lxka-nuscht-search-pnpm-deps.drv' failed with exit code 1;
       last 10 log lines:
       >     at ClientRequest.emit (node:events:519:28)
       >     at emitErrorEvent (node:_http_client:108:11)
       >     at TLSSocket.socketErrorListener (node:_http_client:511:5)
       >     at TLSSocket.emit (node:events:531:35)
       >     at emitErrorNT (node:internal/streams/destroy:169:8)
       >     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
       >     at processTicksAndRejections (node:internal/process/task_queues:82:21)
       >     at runNextTicks (node:internal/process/task_queues:64:3)
       >     at listOnTimeout (node:internal/timers:545:9)
       > Progress: resolved 946, reused 0, downloaded 944, added 944
       For full logs, run 'nix-store -l /nix/store/hk274n3racxlcxzs635c09wz2qd2lxka-nuscht-search-pnpm-deps.drv'.
error: 1 dependencies of derivation '/nix/store/rjam0130s3wsas7sdyyr7pjlcyvzm639-nuscht-search-0.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1fwhi44fv1ksqbkc5j92jpnxmn8r80dh-nuscht-search.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vy73i7z7fgqvq10nnb7brwfnxiv82l7s-nixvim-docs.drv' failed to build

Cause I am building docs manually to see where I need to improve.
I am also doing this to clarify for myself this comment

@MattSturgeon
Copy link
Member

Is it normal for docs not building manual using the docs & serve-docs command in shell?

If you're on darwin (OSX) then we disable the docs because mdbook has an upstream issue. Otherwise no, that could be a bug.

  • Are you on darwin?
  • Do you only see this issue on your branch, or is it on main too?

@Eveeifyeve
Copy link
Author

Is it normal for docs not building manual using the docs & serve-docs command in shell?

If you're on darwin (OSX) then we disable the docs because mdbook has an upstream issue. Otherwise no, that could be a bug.

* Are you on darwin?

* Do you only see this issue on your branch, or is it on `main` too?

I am on x86_64-linux I just pulled the changes from main and rebased my branch so this is a bug.

@Eveeifyeve
Copy link
Author

Is it normal for docs not building manual using the docs & serve-docs command in shell?

If you're on darwin (OSX) then we disable the docs because mdbook has an upstream issue. Otherwise no, that could be a bug.

* Are you on darwin?

* Do you only see this issue on your branch, or is it on `main` too?

but also what issue is on darwin cause I want to debug the issue as I have a darwin machine.

@MattSturgeon
Copy link
Member

You can see in docs/default.nix where we disable it using optionalAttrs (!pkgs.stdenv.isDarwin):

nixvim/docs/default.nix

Lines 68 to 90 in 3c7b6ae

// lib.optionalAttrs (!pkgs.stdenv.isDarwin) (
let
mkSearch =
baseHref:
nuschtosSearch.packages.mkSearch {
optionsJSON = options-json + "/share/doc/nixos/options.json";
urlPrefix = "https://github.com/nix-community/nixvim/tree/main";
title = "Nixvim options search";
inherit baseHref;
};
in
{
# NuschtOS/search does not seem to work on darwin
search = mkSearch "/";
# Do not check if documentation builds fine on darwin as it fails:
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
docs = pkgs.callPackage ./mdbook {
inherit evaledModules hmOptions transformOptions;
# TODO: Find how to handle stable when 24.11 lands
search = mkSearch "/nixvim/search/";
};
}

I'm not too familiar, but it's an upstream issue. If you do want to look into that, let's deal with it in another issue as I don't want it to distract from landing the changes here.

@Eveeifyeve
Copy link
Author

Is it normal for docs not building manual using the docs & serve-docs command in shell?

If you're on darwin (OSX) then we disable the docs because mdbook has an upstream issue. Otherwise no, that could be a bug.

* Are you on darwin?

* Do you only see this issue on your branch, or is it on `main` too?

I am on x86_64-linux I just pulled the changes from main and rebased my branch so this is a bug.

Also would that be a bug?

@khaneliman
Copy link
Contributor

khaneliman commented Oct 18, 2024

I'm able to serve-docs on main and this branch.

@Eveeifyeve
Copy link
Author

Weird for some reason it fails.

@Eveeifyeve
Copy link
Author

I'm able to serve-docs on main and this branch.

Both this branch and upstream are not working on x86_64-linux.

@Eveeifyeve
Copy link
Author

I'm able to serve-docs on main and this branch.

I have made an issue on their end to see if they can fix it.

@Eveeifyeve Eveeifyeve requested a review from khaneliman December 7, 2024 08:28
@Eveeifyeve
Copy link
Author

I am going to work on getting the options finished then sqrash then it will be ready to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PLUGIN REQUEST] cord.nvim
5 participants