-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add option to specify extra paths for plugins #74
Conversation
Added an option to specify "external:" in before a plugin name to import it from an external path instead of from "pyprland.plugins.my_plugin"
Nice ! |
I'm not a native english speaker so I have no idea how it's written correctly, but when I asked chatgpt it says "plugin_paths" is correct. I'm still not a native speaker, so if "plugins_paths" looks better to you I can add that :) |
Oh, it's not about correctness, I believe both spellings are valid...(I'm also not a native speaker): it's more that we can load (several) "plugins", so when adding paths for it we should keep the same spelling as the "plugins" array... that's my only point ^^ |
Oh, in that case case you're right. I'm gonna adjust it when I get back to my computer. |
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.
Great, thanks!
Added an option in
pyprland.toml
that lets you specify extra paths that pypr will search in for plugin modules.Also fixed a bug that would prevent adding custom plugins at all, even using the more manual methods like installing the plugin using
pip install -e .
. At line 96 there is a statement that checks whether the plugin is specified relatively, and if it isn't, imports the plugin frompyprland.plugins
.I added an option to prepend
external:
before the plugin name to explicitly import it from outsidepypland.plugins
. In the case that the statement is actually working as intended this won't break any existing configurations.I tested if it works with a single example but haven't written any tests or documentation yet because I wanted to check if this format looks good.
Edit: I also added the default Python .gitignore template so that stuff like pycache isn't tracked by git