Open oldwomanjosiah opened 2 years ago
I would also be interested in working on this, probably starting with the import syntax
@Battlesquid would the use case for #552 be covered by the import syntax described here?
Apologies for the extremely late response. Yes, the syntax matches what I have in mind. Great expansion on my original feature request, thank you!
Description of the requested feature
It would be really nice to have a consistent location where configuration "libraries" could be installed, akin to neovim plugins. This would make it easier to share components between users, which would likely help eww grow.
/usr/share/eww
and$HOME/.local/share/eww
EWW_PATH
<search path dir>/<plugin name>/<files...>
, but I would think we'd want some manifest file (json, ron, really anything but yaml (I really don't like yaml)) to define things like authors, upstreams, dependencies (validation only), and version requirements.PLUGIN_ROOT
: root directory where plugin is installedplugin
subcommandload <path>
import a plugin at runtime for testing/dev purposesunload <name>
remove a plugin at runtime (mostly also for testing/dev)list
list known plugins (maybe keep previouslyloaded
, but marked as unloaded)widgets <name>
list widgets defined by a pluginLazy loading, namespacing
For this to be viable without slowing things down too much, I would think that we would want to namespace plugins (we really wouldn't want every name to have to start with the plugin name). This could be done with the following new syntax:
(it would also be nice if this syntax could also be extended to import "local" configuration without getting re-def errors)