Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code snippet for extension template #1899

Merged
merged 7 commits into from
Feb 11, 2025

Conversation

DNin01
Copy link
Collaborator

@DNin01 DNin01 commented Jan 29, 2025

Code snippets can be used in Visual Studio Code and let developers autocomplete specific snippets of code, speeding up repetitive processes. Here's how it could work for us:

Snippet.completion.demo.mp4

For developing with Visual Studio Code
@DNin01 DNin01 added the pr: other Pull requests that neither add new extensions or change existing ones label Jan 29, 2025
@DNin01 DNin01 requested a review from GarboMuffin January 29, 2025 22:22
@DNin01
Copy link
Collaborator Author

DNin01 commented Jan 29, 2025

!format

@GarboMuffin
Copy link
Member

That seems quite reasonable

Will vscode interpret the \t as literal tabs or convert them to 2 spaces?

@DNin01
Copy link
Collaborator Author

DNin01 commented Jan 29, 2025

That seems quite reasonable

Will vscode interpret the \t as literal tabs or convert them to 2 spaces?

It auto-converts them based on your settings, so if your settings are to indent with 2 spaces, each \t will be converted to 2 spaces.

@GarboMuffin
Copy link
Member

Believe the formatting bot was only told how to handle the extensions folder

@Brackets-Coder
Copy link

This could change my new extension workflow

@CubesterYT
Copy link
Member

Honestly I love this, I currently use my own self made template extension as the base for any extension I make, I can provide this later.

@GarboMuffin
Copy link
Member

Wish there was standard for these snippets that all editors understand not just vscode

@CubesterYT
Copy link
Member

What if we add a menu as well to the template?

The default value from the first placeholder token will apply to all
@DNin01
Copy link
Collaborator Author

DNin01 commented Feb 1, 2025

What if we add a menu as well to the template?

What do you mean?

@CST1229
Copy link
Collaborator

CST1229 commented Feb 1, 2025

What if we add a menu as well to the template?

What do you mean?

probably adding a menu (as in, menus: {MENU_ID: {items: ["..."]}} etc...) into getInfo

@CubesterYT
Copy link
Member

CubesterYT commented Feb 1, 2025

Along with a menu, maybe as well some block text and a input (considering args is defined in the function later)

Maybe something like

alert(args.INPUT)

@GarboMuffin
Copy link
Member

GarboMuffin commented Feb 6, 2025

if you want to add anything it would be giving the block a text field but really its fine... just makes adding new extension slightly easier. still have to actually write it

Copy link
Member

@yuri-kiss yuri-kiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine as is

@GarboMuffin GarboMuffin changed the title Code snippet for extension template Add code snippet for extension template Feb 11, 2025
@yuri-kiss
Copy link
Member

I am gonna merge this, anything further can go in a new pull request

@yuri-kiss yuri-kiss merged commit ad28b24 into TurboWarp:master Feb 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: other Pull requests that neither add new extensions or change existing ones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants