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
should not assume default config.nu and env.nu #6787
Comments
Somewhat tricky is how to add logic for handling default configuration settings - without changing the Config type, and all the places that make use of Config fields. A suggestion (which I can try implementing if it makes sense) is to inline the |
Just now I updated
I never added these config settings, and now I get warnings about them. It is easy enough to fix - but it's a bug that I would have to. |
I believe this means that these things are in your config file. You must not have updated for a bit because For the most part, we decided that the config.nu should contain the default settings as if when you don't have them, those settings that are in there now take effect. I'm not sure if that's the case for all of them right now, but originally, that was our intent. One exception to this is when git completions were added. It also serves as some level of documentation. |
"I believe this means that these things are in your config file." |
Looks similar to #7371 |
Related problem
Automatically installing default
config.nu
andenv.nu
files is convenient for developers but is it fragile and user-unfriendly.config.nu
andenv.nu
and it is unreasonable to ask users to update.In my opinion, this should be fixed/changed before 1.0.
Describe the solution you'd like
Any setting that has a recommended default that is currently written into these files should be figured out internally (like
buffer_editor
). A setting should not need to be in a configuration file if it follows the recommended default.On startup,
config.nu
andenv.nu
should never be created automatically, andnu
should not complain or warn if they're missing.Describe alternatives you've considered
For developer convenience, an alternative is to process a built-in startup file before the user's startup files. However, it is faster and better to do it in Rust code.
Additional context and details
No response
The text was updated successfully, but these errors were encountered: