Feedback on plugin

Hello,
So I uhh, wanted to have snippets like you’d see in VS code or Microsoft Visual Studio 2022, but I didn’t know how you could make them in roblox, (if you can, then the setting must be well hidden)

I made a plugin specifcally for creating code snippets, it doesn’t have much functionality & I know the UI is pretty lame, but I am making some modulescripts with custom UI components and I am planning a full UI rework.

So quick tutorial because I don't think it is self explanatory

so when you tap the ‘Manage Code Snippets’ button, it will open the plugin’s widget, and you’ll see a list of premade code snippets & script templates, but you can also add your own by tapping the ‘add’ button which will open the Configure Snippet View.

for now let’s focus on using snippets & templates, so if you press any premade snippet you’ll be met with this:


a read only textbox on the left shows what the snippet/template looks like, and a field called ‘type of script’ is where you type the type of script you want to insert (module, local, server) if your input is invalid it will insert a server script. (also sorry but you will need to type caps like so ModuleScript, but one of the components I’m making is a combobox which will make it easier to select them in the future)

you’ll see an identifier field, the placeholder text of every identifier is their default value, so you can see in the code snippets where these are used by looking for %identifier% in the snippet, and basically, the value you type in the identifier will replace %identifier% when you press ‘Use’.

when you press ‘use’ it will insert the chosen script with the given template/snippet into the current selection. (so if you select workspace it’ll pick workspace).

you can also remove the snippet from your list if you don’t like it by pressing ‘remove’, but default snippets will just come back when you restart studio because I didn’t want them to be actually deleted, user snippets can be deleted though.

so when you go back to the main menu and select ‘add’ it will open the configure view where you can type the name of your snippet, and add identifiers, they have a name field & a default value field you can modify, when you press next it will bring you to a text box and you can type your snippet there, to add identifiers to your snippet use its name enclosed in % signs., lastly, pressing create will add it to your list, they are persistent so when you restart studio they are still in your list.

now, by default, auto complete suggestions for these snippets/templates are disabled, but by pressing ‘Enable Snippet Suggestions’ they will be added to the auto complete when you type, so when you type the snippet’s name it will pop up with a short description of the snippet (right now user snippets descriptions can’t be modified sorry, but again, I’ll add it later).
by clicking accept on a snippet it will insert it into your current pointer’s position. now with snippets (code snippets without identifiers) this works normally, but with templates (code snippets with identifiers) it will use the default values, which is why they are important when you create a code snippet.

here’s how it should look:


as you can see it has the normal description with the preview of how it will look on the right.

Don’t be too harsh on the UI since this is the mvp with some styling to not make it ugly.
The reason as to why I am publishing the mvp is because I need some feedback now, to see if I need to perform some drastic changes later, doing it right now, would mean that I don’t need to change a lot of things.

Hope this helps you add snippets to your developer experience!
plugin:
Snippet Manager - Creator Store (roblox.com)

Thanks for reading!

4 Likes

Actually a good plugin. Works well, UI isn’t the best but that doesn’t matter when you aren’t really going to see it once you’ve made all your snippets. UI still is intuitive and easy though, so you’ve got that.

Thank you for the plugin!

Also, I had to download the plugin and pop it in my plugins folder instead of directly downloading it, don’t know if it’s on your end or roblox’s end.

Suggestions: Replace the frame where you edit your code snippets with a scrollingframe so we can edit all of the code in the snipper more easily.

Also, maybe an edit button in case there are mistakes in the snippet so you don’t have to create the snippet again.

Again, great plugin :smiley:

1 Like