nix-community / nixvim

Configure Neovim with Nix! [maintainer=@GaetanLepage, @traxys, @mattsturgeon]
https://nix-community.github.io/nixvim
MIT License
1.41k stars 213 forks source link

[BUG] Neorg does not work due to missing dependency #1395

Open vendion opened 3 months ago

vendion commented 3 months ago
Field Description
Plugin neorg
Nixpkgs unstable
Home Manager unstable

Description

It seems the version of the neorg plugin got bumpped and now no longer works due to a missing dependency. on lua-utils. It seems this dependency was added in v8.0.0 but the change must have only recently hit nixpkgs unstable.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
    plugins.neorg.enable = true;
}
amalgame21 commented 3 months ago

I think this is the related discussion: https://github.com/nvim-neorg/neorg/issues/1342 I just use the neorg from nixos-23.11 branch For standalone configuration: https://github.com/nix-community/nixvim/discussions/1397#discussioncomment-9054044

vendion commented 3 months ago

In the mean time yes I know I can use the Neorg package from stable, but at the same time it would be nice for the latest version be fixed as well.

Kintaro commented 3 months ago

I think a fix for that needs to be landed in nixpkgs for a proper fix, not in nixvim. I'd love for a simple way to fix it without resorting to the stable fix, cause it kinda doesn't work on my end.

GaetanLepage commented 3 months ago

Thank you for reporting. I am aware about this. However, we cannot do much on the nixvim side.

The solution has to be implemented on the nixpkgs side: we should package neorg as a lua package (luaPackages.neorg) there and build vimPlugins.neorg on top of it. This is worked on here.

71zenith commented 2 months ago

Another solution is found is to declare their official overlay to override the bugged package https://github.com/nvim-neorg/nixpkgs-neorg-overlay

sachinchaudhary1808 commented 1 month ago

they updated there pkg image now it should work ha ?

MattSturgeon commented 1 month ago

they updated there pkg, now it should work ha ?

I'll close this then. We can re-open if the issue is still present.

GaetanLepage commented 1 month ago

I'll close this then. We can re-open if the issue is still present.

The update has nothing to do with the general issue which is not neorg-specific. Indeed, the core problem here is that the lua dependencies of "neovim plugins" in nixpkgs (i.e. built from a luaPackage.*) are not propagated. This is the same reason why luasnip complains with missing the jsregexp library.

Thiago-Assis-T commented 1 week ago

Is there something still needed for this to work?

MattSturgeon commented 1 week ago

Is there something still needed for this to work?

This PR is where it's being worked on: https://github.com/NixOS/nixpkgs/pull/302442

As mentioned above, you can use the overlay as a temporary workaround.

Thiago-Assis-T commented 1 week ago

sorry, came out rude, thank you for the response