cashapp / hermit-ij-plugin

Apache License 2.0
9 stars 4 forks source link

Support for Python SDKs #43

Open alecthomas opened 2 years ago

alecthomas commented 2 years ago

Similar to how we support the JDK and Go, it might be good to add native support for Python now that we have stable packages for it.

Ubehebe commented 2 years ago

Happy Hermit user here -- I just ran into this too. I'd like to learn more about IntelliJ plugin development -- is this something I could reasonably do in a day or two?

jvmakine commented 2 years ago

@Ubehebe All contributions would be highly appreciated! 😄

I think it should be doable in a couple of days. Every language plugin in IntelliJ seems to handle their SDKs slightly differently, so you would have to see how the Python plugin manages its SDKs. But once that is done, you should be able to use our GoSDK and JDK updates as a template to add it to the plugin.

Basically, you will need a conditional config block like this: https://github.com/cashapp/hermit-ij-plugin/blob/main/src/main/resources/META-INF/plugin.xml#L52 That only gets loaded if the python plugin is present, and then you can add a Python specific handler to Hermit property changes like this: https://github.com/cashapp/hermit-ij-plugin/blob/main/src/main/resources/META-INF/goland.xml#L7

Happy to help if you have any questions!