Replies: 3 comments
-
|
I was quite positive that I've responded to this. Must be the old age getting to me... The agreed upon decision, although never formally codified, is that we should not overpopulate
This is true, but I am more in favor of requiring module additions to document particularly complex module options, for two reasons
A compromise could be to avoid setting a default value, but that leaves the issue with
I have two ideas in mind to remedy this issue. The first one, which I've been working on for a while now, is the machine tests. I intend to start with tests for flake packages (i.e., those packaged in our flake.nix insted of being constructed from npins) and then move on to packages that are known to break often. I Currently working on a small change to the structure of the packages output, and I'll make a small addition to the "hacking" chapter while I'm at it to document how to add & update those kinds of packages. Also open to more suggestions or discussion if you'd like to add anything else. CC @horriblename for his input on the matter. For v0.8 we may consider getting rid of all default types and values, but that'd delay the release further. |
Beta Was this translation helpful? Give feedback.
-
|
Most of my opinion is close to raf's so just I'll keep this short I lean heavily towards having a minimal setupOpts, though complex options should be documented in some form.
that's a big fat invisible breaking change I'd rather not touch |
Beta Was this translation helpful? Give feedback.
-
|
Looks like it was my turn to forget to update here… Thank you both for your thorough responses. I think we are aligned on the approach and it's good to get clarity on that. It might be good to distill this into a section in the hacking chapter. Let me know if you think that's a good idea and I'll create a draft. Anyway, thank you for the great work. I'm looking forward to seeing the languages overhaul work finished (I've been using that for the last week without any issues). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was configuring
vim.assistant.avante-nvimlast week and noticed that it lists so many options undersetupOptsbut there is no special implementation or translation for any of those. In this case they serve mostly to document the possibilities. I wonder if this was done on purpose and if there is a preference for treating plugins this way.The other approach is a plain
setupOptsonly introducing options if there are exceptions (custom defaults or transformations).I see pros and cons for both approaches:
Minimal
setupOptsmakes it easy to add support for new plugins lowering the barrier for contributions and also simplifies maintenance since there is not much to keep in sync with the development of the plugin. But this approach leaves it to the user to go and find the documentation of the plugin at the source and translate the lua configuration into nix for the things they want to change. Linking to the website of the plugin from the documentation of theenableoption could help with this.Detailed
setupOptsadds more maintenance burden mostly on the documentation side and makes it more difficult to upgrade a plugin in case of breaking changes like the recentvendorstoprovidersmove for avante. But it also makes it easier for users to search for the available options in nvf's documentation and the examples are usually helpful in complex cases wheremkLuaInlineis involved.In most cases it makes sense to start with the first approach and gradually move towards more documentation as time allows.
A slightly related question is the matter of plugin upgrades. When using the minimal approach in most cases it only takes updating the plugin in npins, but that might cause breaking changes in user configurations which are not visible and could be difficult to detect and document. With the detailed
setupOptsapproach breaking changes that affect the configuration of the plugin are more visible and will make it necessary to usemkRemovedOptionModuleormkRenamedOptionModule.I'm looking for guidance around these matters possibly as a section at https://notashelf.github.io/nvf/index.xhtml#ch-hacking
Beta Was this translation helpful? Give feedback.
All reactions