Skip to content
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

Allow third party plugins #1787

Closed
idanarye opened this issue Jul 7, 2021 · 1 comment
Closed

Allow third party plugins #1787

idanarye opened this issue Jul 7, 2021 · 1 comment

Comments

@idanarye
Copy link

idanarye commented Jul 7, 2021

Jedi has a plugin architecture, but the plugin registration is hard-coded in jedi/plugins/registry.py. It could be useful to allow users to install their third party plugins, so that frameworks, libraries, or even just big projects could offer plugins that allow Jedi to understand the non-standard things they do.

Having Jedi import plugins from a project the user works on is too risky, but maybe the users can install them separately and configure them in some ~/.config/jedi/config.py file or something?

@davidhalter
Copy link
Owner

It was originally thought to be a public thing. However I decided against publishing it for the following reasons:

  • The current plugin architecture exposes a ton of internal concepts that are not well documented. They would all need to be documented well.
  • I'm not sure I want to export those internals. There's a good reason the jedi.api package exists. I want to avoid not being able to refactor things. At that point plugins would either often break or Jedi couldn't change its internals anymore. Of course you could also make an abstraction around this kind of stuff, but that's really a ton of work as well that I'm not sure I want.
  • I feel like with stubs coming to Python there are almost no reasons for a plugin system anymore. You can simply annotate most things. If you cannot do that, you probably (90% chance) messed up and should change your code.
  • It causes me a lot of work that I don't like as much as rewriting Jedi in Rust :).

For all of these reasons I'm still choosing not make it public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants