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

Tests: use minimal configuration by default #459

Merged
merged 1 commit into from
May 24, 2023
Merged

Conversation

mg979
Copy link
Contributor

@mg979 mg979 commented Feb 3, 2023

Previously, when running PlenaryBusted commands, all plugins were being loaded.

{ minimal = true } wouldn't work either because plenary must be loaded, --noplugin would prevent that.

{ minimal_init = path } had the same problem.

Solution:

  • minimal by default
  • minimal and minimal_init are still recognized and will have the effect of adding the --clean argument, but most of the times they can be omitted
  • minimal_init will still be sourced
  • minimal is the same as no options, so it can be omitted
  • additional 'init' option, that doesn't use --clean
  • in any case, plenary directory is always added to the rtp, so no need for the user to do that

I couldn't make it work in Windows though (neither before).

@mg979
Copy link
Contributor Author

mg979 commented Feb 4, 2023

I kept minimal and minimal_init for backwards compatibility, but imho they're cruft. It would be better to have a single args key, accepting a table with extra arguments, and just use --clean when it's not given.
Plugin directory would be added to the rtp regardless.

@Conni2461
Copy link
Collaborator

yeah i kinda wanna keep backwards compatibility. No real need to a breaking change here.

thanks for the PR :) can you fix the stylua ci? thanks

@mg979
Copy link
Contributor Author

mg979 commented Feb 28, 2023

I fixed it by the way. I also tested the PR against nvim-lint and null-ls.nvim tests and it was ok.

@Conni2461
Copy link
Collaborator

thanks :)

@Conni2461 Conni2461 merged commit c4d6e55 into nvim-lua:master May 24, 2023
6 checks passed
Conni2461 added a commit that referenced this pull request May 24, 2023
@Conni2461
Copy link
Collaborator

using --clean here is a breaking change, we need to continue to use --noplugin, see #497

Conni2461 added a commit that referenced this pull request May 24, 2023
Conni2461 added a commit that referenced this pull request May 24, 2023
Conni2461 added a commit that referenced this pull request May 24, 2023
@wookayin
Copy link
Contributor

wookayin commented Sep 26, 2023

This was reverted in #497. So for now, as per #497 we will use user's init.lua but without plugins, which is kind of weird setup (see #497 (comment)).

Can we have this back again?

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

3 participants