NotAShelf / nvf

A highly modular, extensible and distro-agnostic Neovim configuration framework for Nix/NixOS.
https://notashelf.github.io/nvf/
MIT License
212 stars 29 forks source link

3rd/image.nvim support #223

Closed Nowaaru closed 8 months ago

Nowaaru commented 8 months ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Type

New Addon

🔖 Feature description

..Yeah, I'm blowing up this repository. So what? :P

With the current API, there's no way to implement extraLuaPackages, especially when the current source (seemingly) uses stable instead of unstable or nightly. I also am unable to affect the Neovim flake by modifying the Neovim home-manager option.

✔️ Solution

As far as my tiny brain goes, I can really only see two viable ways to get this to happen without affecting every user, in particular the users who don't need this and therefore doesn't need the package(s) installed.

One way is to change the unwrapped package to nightly when image.nvim is installed and follow the "Without Home Manager" method of installation. However, this can also indirectly affect the functionality of unrelated plugins - a different version could end up causing different behavior, which makes debugging a lot harder.

Another way is to have an opt-in "let-me-use-nightly" kind-of option that the plugin requires which could be likened to an "unsupported" disclaimer.

❓ Alternatives

Looked at edluffy/hologram.nvim, but the coverage (and seemingly, performance) isn't as ideal as image's own.

A function to provide in order to wrap the package ourselves would also suffice. We can already provide the vim.package, the problem only lies in wrapping it with luarocks and magick.

📝 Additional Context

No response

NotAShelf commented 8 months ago

With the current API, there's no way to implement extraLuaPackages, especially when the current source (seemingly) uses stable instead of unstable or nightly.

We are based off of nixos-unstable. We do use neovim's stable releases from nixpkgs, but there's a vim.package option you can use to change that.

I also am unable to affect the Neovim flake by modifying the Neovim home-manager option.

The option for neovim-flake is actually programs.neovim-flake, not programs.neovim under home-manager.

NotAShelf commented 8 months ago

Tracked at #224 - having issues with luarocks due to lua being lua. I'll take another look when I have a little more time.

NotAShelf commented 8 months ago

available in v0.6 branch now.