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

feat(project): add to mini.starter #640

Merged
merged 2 commits into from
May 22, 2023
Merged

Conversation

Jomik
Copy link
Contributor

@Jomik Jomik commented Apr 20, 2023

I am unsure where to put this, as it sort of belongs to two extras.
What I added here will cause mini.starter to always be loaded if you include the projects extra, right?

@nunestiago
Copy link

Gave a check and couldn't really understand what else it brings that the already installed goolord/alpha-nvim is not able to do.

@Jomik
Copy link
Contributor Author

Jomik commented Apr 20, 2023

Gave a check and couldn't really understand what else it brings that the already installed goolord/alpha-nvim is not able to do.

It is to support https://github.com/LazyVim/LazyVim/blob/81ab5bed7a81c3005f862d6508dacc26c4ed553a/lua/lazyvim/plugins/extras/ui/mini-starter.lua

@ditsuke
Copy link
Contributor

ditsuke commented May 6, 2023

I believe this PR has the same problem I encountered in my own configuration with dependent layers: the mini.starter spec gets added even when the mini-starter layer is not imported.

For my configuration I had to come up with a HACK-ish workaround so I don't add the specs at all if the parent layer is not loaded: https://github.com/ditsuke/nvim-config/blob/main/lua/ditsuke/utils/lang.lua#L9C3-L11. Now I'm not sure if Lazy already offers a way to tackle this natively, but if not I'd like it if that's done first before we let this one in.

@folke
Copy link
Collaborator

folke commented May 22, 2023

I just pushed a change to lazy.nvim that can better deal with situations like this.

Please add optional=true to the mini.starter spec and while you're at it also add it to the alpha one part of the same file.

What this does, is it will only add those specs in the final spec if the plugin has been configured somewhere else without the optional=true.

This ensures, that for people not using alpha, or mini.starter, that those plugins won't be automatically installed.

@Jomik
Copy link
Contributor Author

Jomik commented May 22, 2023

That is awesome! Should be ready now :)

@folke folke merged commit f898233 into LazyVim:main May 22, 2023
3 checks passed
@folke
Copy link
Collaborator

folke commented May 22, 2023

Just tested and it all works as expected :)

Thanks!

@Jomik Jomik deleted the mini.starter-project branch May 22, 2023 18:33
ofrades pushed a commit to ofrades/LazyVim that referenced this pull request May 30, 2023
* feat(project): add to mini.starter

* fix(project): make alpha and mini.starter optional
joshmedeski pushed a commit to joshmedeski/LazyVim that referenced this pull request Sep 1, 2023
* feat(project): add to mini.starter

* fix(project): make alpha and mini.starter optional
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.

None yet

4 participants