-
-
Notifications
You must be signed in to change notification settings - Fork 282
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/lazy.nvim: new plugin manager #1175
Conversation
Looks good, I will have a play with this on the weekend. I have thoughts on the 'build' part of Lazy though. Ideally the build would be unnecessary in Nixvim as it should have already been built and put into Nixpkgs as part of the packaging of dependencies. Is this not the case for plugins you have tested? If it isn't I wonder if we can create a derivation in some sane manner to ensure that the dependencies are built in a reproducible way that can be fed to Lazy instead of doing the build inside of Lazy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice!
I think we could improve a bit in the future the opts
(or config
, not sure) field by providing a function of the form helpers.initLuaFromModule ({...}: {#nixvim module}
, but this is larger than the scope of simply lazy.nvim.
Would it somehow be possible to configure a plugin that already comes with nixvim (like eg telescope) using the options provided in nixvim, but then use lazy to load this plugin? |
This is the goal in the long term but we are not there yet. |
Totally, I should have come to that conclusion myself 😆 |
@traxys is there a slightly more elegant way than doing this?
It does the trick but it has a certain "smell" :) |
helpers.mkNullOrOption (maybeRaw (either str (listOf str))) ? |
@traxys Ohh, just seen your comment in the thread above, let me try the parenthesis the other way! Update: Yup, that was it, forgot the parenthesis the first time... funny I remembered to apply them in the smelly version... |
Just slightly meta: the revisions to this PR were done in a nixvim instance that uses this plugin manager. |
@traxys can we land this soonish? |
@ck3mp3r Was the "import" lazy.nvim option forgotten or intentionally left out? plugins.lazy = {
enable = true;
plugins = with pkgs.vimPlugins; [
{
pkg = LazyVim;
import = "lazyvim.plugins";
}
];
}; error: The option `plugins.lazy.plugins."[definition 1-entry 1]".import' does not exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite a lot of really long lines, mainly due to descriptions. Could you use ''
quotes, and split them on multiple lines?
I'll see when I have time to address these issues. For the time being I need to get back to my day job. On a different note: I am not sure the abstraction being added by nixvim isn't doing more harm than good. The more I use it the more I want to keep things simple in the nix realm and allow configuration that isn't related to packaging and distribution to be just handled by the neovim ecosystem... |
@jla2000 this is not currently in scope. It would have to be translated to nix as it is lazy.nvim specific functionality for bundling plugin dependencies. |
@ck3mp3r Just curious, how did you install treesitter grammars with the lazy.nvim setup? Does it even work at the moment? |
@jla2000 have a look here, this is my current testing branch. It works fine actually :) |
Ah I see, you have to add it to the runtime path again since lazy clears it :) Thanks! |
There are two main ways to write nixvim modules, the way this PR does it (the "old" way) where we type every option strictly, but there is another way we are starting to look into, inspired by the NixOS RFC 42, that uses freeform options and a lot less magic |
This PR addresses #797