Idea for code completion for Cinnamon / Gnome Shell with Gjs and GObject-Introspection

One of my biggest gripes with Gnome Shell or Cinnamon is the lack of documentation and code completion while developing. I’ve been working on a basic way that I could create code competition for myself for some of the most common functionality.

It’s a very simple, you can see an overview here:

The idea is to create stub classes for all of the files normally accessed with imports. Most IDEs also support JS Doc annotations. Simply by creating a docs directory in your project and adding the stub files makes code completion work with no other changes.

I find this particularly useful for using functions from the core files that GObject Introspection allows us to call so I don’t have to go hunting in C files.

It would be great to be able to create a basic stub of every function available¬†programmatically although I haven’t delved too deep into this yet. I’ve always found to be a good source of info for unknown functions.

, , ,

One thought on “Idea for code completion for Cinnamon / Gnome Shell with Gjs and GObject-Introspection

  • Logan says:

    As someone who has had significant trouble finding documentation ( seems to be my saving grace now), I definitely agree that there needs to be better documentation.

    I only figured out today that the libraries are exposed via Gjs. Do you know of any good sources/primers on Gjs so that I can figure out what all is available? I noticed even my link doesn’t have things like GLib listed, so I’d like to know how to identify which functions are available.

Leave a Reply to Logan Cancel reply

Your email address will not be published. Required fields are marked *