sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
14.03k stars 320 forks source link

Plugins installed by `ya pack` shouldn't go into config directory. #1157

Closed SolitudeSF closed 2 months ago

SolitudeSF commented 2 months ago

Please describe the problem you're trying to solve

Config directory should have user configuration intended for user modification. Placing user plugins and installed plugins into the same directory leads to confusion, risk of modifing plugins that will be overwritten on the update anyway, complicating dotfile management and polluting file-tree with DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY noise.

Would you be willing to contribute this feature?

Describe the solution you'd like

Yazi should load plugins from XDG_DATA_HOME (.local/share/) or appropriate alternative.

Additional context

No response

sxyazi commented 2 months ago

What should be done if a plugin with the same name exists in both .local/share/ and ~/.config/yazi/plugins?

SolitudeSF commented 2 months ago

i would imagine an explicit user configuration should always take the priority.

sxyazi commented 2 months ago

Do you mean a config option determines which location to check first, or does it mean it only uses which one location?

SolitudeSF commented 2 months ago

i mean that plugins in .config should take precedence over .local/share

sxyazi commented 2 months ago

I think this will cause confusion as some plugins come from .local/share/, while others come from .config, which will reduce observability - users will need to pay attention to the contents of both directories at the same time. And we have to introduce a priority for it.

Also this will add unnecessary complexity - we will have to explain the differences and purposes of these two directories in the documentation. It will also be inconvenient for users when they install plugins from the web and review their code, as they will have to find them in .local/share/ instead of the more familiar .config.

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.