18.8.17

Autocompletion with ksonnet in your Golang IDE

I work about 50% JVM stuff, 50% in Golang, and another 30% of my stuff in python.  Because of that, I tend to use Intellij for its rich plugins and native JVM feel - along side its full featured GoGland IDE for go stuff.

Recently my head was spinning w/ a 500 line YAML for a large cloud-native kube application, that needed several customer deployments, and my friend timothysc showed me  http://ksonnet.heptio.com .

I was sad though when ksonnet said it had special treatment for VsCode users.

...but guess what...

It works with intellij to !

The trick is to associated your ksonnet files with a javascript file type, and then INSTALL the ksonnet library INSIDE your intellij project, like this:


Now, the file "jay.libsonnet" will automatically see all the JS extensions in ksonnet-lib.

Digging deeper, this is b/c libsonnet actually generates JS files, in the end...

So, long story short: Any javascript aware IDE can probably be hacked to autocomplete KSonnet bindings for your ever expanding cloud native app portfolio.

No comments:

Post a Comment