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

mkNeovimPlugin: refactor lua code generation logic #2623

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

GaetanLepage
Copy link
Member

@GaetanLepage GaetanLepage commented Dec 9, 2024

Follow-up of #2619

This keeps the current behavior of not adding a plugins.*.luaConfig option if it doesn't make sense (for rustacenvim for e.g.).
What has been removed is the ability/expectation for configLocation to be null.

@GaetanLepage GaetanLepage force-pushed the luaConfig branch 2 times, most recently from a52b607 to 003e099 Compare December 9, 2024 19:43
@GaetanLepage GaetanLepage requested review from MattSturgeon, khaneliman and traxys and removed request for MattSturgeon and khaneliman December 9, 2024 19:44
Comment on lines +164 to +165
# Write the lua configuration `luaConfig.content` to the config file
(setLuaConfig cfg.luaConfig.content)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: why is it ok to remove the null check? (configLocation != null)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it should never be null.
null is a forbidden value. Or at least, it is fine as long as hasLuaConfig is false.

@traxys
Copy link
Member

traxys commented Dec 9, 2024

I made #2624 to see how we could implement a luaConfig attribute for plugins that are configured with globals. If the design is good enough maybe we should have an argument of mkNeovimPlugin which would allow rustaceanvim to use that?

@GaetanLepage
Copy link
Member Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented Dec 9, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at cf7e026

Copy link
Contributor

mergify bot commented Dec 9, 2024

This pull request, with head sha cf7e026c8c86c5548d270e20c04f456939591219, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha cf7e026c8c86c5548d270e20c04f456939591219 is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch luaConfig, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit cf7e026 into nix-community:main Dec 9, 2024
4 checks passed
@mergify mergify bot temporarily deployed to github-pages December 9, 2024 21:47 Inactive
@GaetanLepage GaetanLepage deleted the luaConfig branch December 9, 2024 21:48
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.

3 participants