-
-
Notifications
You must be signed in to change notification settings - Fork 330
plugins/lazy.nvim: switch to mkNeovimPlugin #2082
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
base: main
Are you sure you want to change the base?
Conversation
5a142a3
to
2205937
Compare
2ca79f3
to
8230165
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
85482f0
to
4473f5c
Compare
pluginType
freeform71f83e8
to
5a7b6c0
Compare
Seems there's two errors being picked up by CI currently, both part of the
And
|
Hmmm I did see that and I think I have some ideas on how to fix it. Do you know how to run just the test-17 group? This doesn't work |
You can do If you enter a devshell, you can also use our Further, if you don't want to use a devshell, you can still get at individual tests within a group by using the E.g. |
1e52f22
to
a128e90
Compare
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.
So I was able to simplify the
pluginToLua
function, I'll add that as a temporary commit to this PR, and if it's deemed as appropriate for this PR itself I can squash it but if not I'll move it into it's own separate PR
Looks much better. I think it makes sense as part of this PR.
I only really went over this part of the PR in this review, but I'll try and find time to fully review soon as everything seems to be coming together 😀
308d683
to
64eff65
Compare
I just wanted to comment because I know I haven’t made any updates to this PR in a while. This PR is a priority for me, but I haven’t been able to find the time to work on it, and I’m currently without a computer at the moment. I will try to get it done before the holidays, but it may take me longer to get around to it. It is a big refactor all and it should be done well |
I noticed that the |
Just as by way of an update, I've finally been able to get around to looking at this again. It's been a while since I've looked at the code for this but hopefully will have the PR fleshed out enough for a merge in the coming days |
64eff65
to
deb91ca
Compare
I know it's pretty long overdue, and sorry to anyone that's been holding out for this! Just got around to taking a look at this after a long while so I'll probably be a bit rusty. I'd definitely appreciate a couple of eyes on this. Edit: I'm going to move the PR back to draft stage, as I take care of miscellaneous minor edits and suggestions like better descriptions etc. But please feel free to take a look at the PR still and give suggestions :) |
7e185d2
to
a85dbef
Compare
Sorry about the late response, and yes you're correct that is missing but it isn't necessary to be explicitly defined here. The reason being is that that each plugin is defined as a freeformType so any options that aren't explicitly declared can still be passed through. |
plugins/pluginmanagers/lazy.nix
Outdated
package = "lazy-nvim"; | ||
|
||
# TODO: remove this | ||
deprecateExtraOptions = true; |
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.
Can this be removed as there is this:
nixvim/plugins/pluginmanagers/lazy.nix
Line 308 in a85dbef
dependencies.git.enable = lib.mkDefault true; |
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.
This implements a rename warning for a legacy option called extraOptions
which is now replaced by the freeform settings
option.
Setting this to true causes mkNeovimPlugin
to add an alias: mkRenamedOptionModule ["plugins" "lazy" "extraOptions"] ["plugins" "lazy" "settings"]
We've probably had the alias long enough that users should've migrated though. See #3181
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.
Ok I will go ahead and remove it then (should be safe to do so now)
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.
If it was added at the same time as the other rename warnings, it should stay for a while.
They can all be moved to a separate file though if preferred.
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.
So I added that as a part of this PR because I saw it in neo-git
when I was looking into how dependencies.git
was defined
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.
Looks like the plugin doesn't currently have an extraOptions
option, and never did, so yeah this isn't needed 👍
This comment was marked as resolved.
This comment was marked as resolved.
a85dbef
to
cadfa01
Compare
cadfa01
to
c187b5b
Compare
You should be able to run e.g.: tests plugins-pluginmanagers-lazy -- --show-trace The Some programs also use |
2cbac0e
to
c3cbc29
Compare
c3cbc29
to
711e6be
Compare
This PR came about as a result of the comments made in this PR #1904. It refactors the existing lazy plugin manager to use
mkNeovimPlugin
and makes the plugin type freeform.Closes #2174 #1904
Here's an example of how to set up
LazyVim
using the changes to this plugin (Note: this is a standalone flake, saving it to any directory asflake.nix
and runningnix build
should be enough, to launch neovim run./result/bin/nvim
)