VSCode extension to integrate with PG

Apologies for what will be more of a hurried brain-dump-before-I-forget, but I wanted to share a thought that came to me while working on some BJS stuff.

Though there’s an extension for viewing .babylon files, I think there’s potential for greater things.

If I’m using the PG to quickly rough out some piece of functionality that’s part of a locally-developed app, I then need to figure out how to get everything from the PG into my existing code. No worries, if I plan my snippet accordingly, it’s not too onerous a task, but it’s not very efficient and it introduces opportunities for introduced defects - an “unforced error” in sportsball parlance.

But what if I could place my cursor at a spot in my .js or .ts file, specify a PG snippet hash+rev, then be presented with a list of functions defined in the snippet for insertion into my code?

Does it require too much formalized structure to a PG snippet? Too much coding discipline to neatly separate functions out?

HTH

Do you mean something like that? - Visual Studio Code & babylonJS autocompletion - #21 by sunsetian

Nope, that’s great for the BJS API’s, I’m thinking more along the lines of this:

Say you have a function foo() in your PG snippet #ABCD1#2 that you want to bring into your code. The VSCode extension I’m picturing would a) download the snippet, b) crank through the function declarations in the snippet, and c) allow the user to select a function from the snippet to place at the cursor