-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
neovim: set provider configuration to initrc #487390
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
Merged
+25
−25
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
What would be the result of losing these
providerLuaRcvariables for a downstream consumer of the wrapper?Before:
After:
Is this just going to make Neovim search for those on PATH instead of automatically including the direct paths?
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.
nope the same code is included in the generated
rcContentinstead https://github.com/NixOS/nixpkgs/pull/487390/changes#diff-647e8d1c5843195e278d71753f17d2183d961166104c8c55edc4cb93768579ddR108There 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.
i.e a plain user should not see the difference, someone setting
wrapRc = falsewill be fine if he already includes the wrapperluaRcContentsomehow. If he doesn't, now he must :pThere 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.
I guess what I was trying to figure out was, this is technically a breaking change that generates a different wrapper for those relying on it from there. What is the effect of that no longer being included in the wrapper and / or recommended migration for consumers of the existing wrapper semantics?
Should probably have a short blurb in release notes about the behavior changing so there's something to reference if a config stops working how it had before the change.
Just trying to avoid surprising people with undocumented changes if they will affect neovim at runtime.
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.
Maybe i'm being overly cautious @mrcjkb any thoughts?
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.
Before this PR, the neovim wrapper was invoked with
--cmdflags are invoked afterinit.lua(you can test this by addingvim.g.foo = "hello"to yourinit.luaand then runningnvim --cmd ":lua vim.print(vim.g.foo or 'foo unset')").So this PR moves the sourcing of the
providerLuaRcto an earlier point of Neovim's startup sequence.Technically, a config could break if it tries to use one of the providers in the
init.luaand the user doesn't know that they have it disabled.I think it's highly unlikely, as providers are typically used by plugins and Neovim loads providers lazily using
:h autoloadscripts.For example, the python provider is only loaded if a user or a plugin calls the Vimscript function
provider#python3#Callorprovider#python3#Require.Uh oh!
There was an error while loading. Please reload this page.
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 anything setting the providers earlier could fix things where a plugin checks if the provider is set (and currently thinks it's not). I doubt many users use remote plugins. With the remark of marc, I've updated the commit description to :