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

[Feature]: VS Code Snippets for TypeSpec #4559

Closed
3 tasks done
archerzz opened this issue Sep 27, 2024 · 12 comments
Closed
3 tasks done

[Feature]: VS Code Snippets for TypeSpec #4559

archerzz opened this issue Sep 27, 2024 · 12 comments
Labels
design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc. triaged:core
Milestone

Comments

@archerzz
Copy link
Member

Clear and concise description of the problem

VS Code Snippets are quite useful for quick typing codes. We should add some common snippets through our VS code plugin for TypeSpec.

Like below:
image

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@archerzz archerzz added the ide Issues for VS, VSCode, Monaco, etc. label Sep 27, 2024
@archerzz archerzz changed the title VS Code Snippets for TypeSpec [Feature]: VS Code Snippets for TypeSpec Sep 27, 2024
@timotheeguerin
Copy link
Member

timotheeguerin commented Sep 27, 2024

what kind of snippet are you thinking of? we cannot add any azure specific snippet directly in the base extension.

If so seems like the options is we either might be able to define snippet dynamically and need tsp library yo provide them in some way or provide an typespec azure snippet extension.

@archerzz
Copy link
Member Author

what kind of snippet are you thinking of? we cannot add any azure specific snippet directly in the base extension.

If so seems like the options is we either might be able to define snippet dynamically and need tsp library yo provide them in some way or provide an typespec azure snippet extension.

I think we can split snippets into different categories.

  • fundamental snippets, like:
    image
    • I think that can go with TypeSpec extension
  • snippets under specific circumstances, like Azure, those can be installed through separate snippet extension

@markcowl markcowl added design:needed A design request has been raised that needs a proposal triaged:core labels Sep 30, 2024
@markcowl markcowl added this to the Backlog milestone Sep 30, 2024
@RodgeFu
Copy link
Contributor

RodgeFu commented Oct 7, 2024

@archerzz , are you aware of any other Azure specific requirements for TypeSpec IDE. It will be helpful for us to triage and see whether we does need one more extension just for Azure specific features, or maybe it's easier and lower cost to just support dynamic code snippet if this is the only one requirement. thanks.

@archerzz
Copy link
Member Author

archerzz commented Oct 8, 2024

@archerzz , are you aware of any other Azure specific requirements for TypeSpec IDE. It will be helpful for us to triage and see whether we does need one more extension just for Azure specific features, or maybe it's easier and lower cost to just support dynamic code snippet if this is the only one requirement. thanks.

AFAICS,

  • WYSWYG editor (consume output from TCGC to generate a hierarchy of client structure)
  • Copilot to help compose service definitions (like Copilot 365)

@timotheeguerin
Copy link
Member

Even if it was just snippet I do think it might be easier anyway to just make a snippet only extension, the only problem is discoverability for our users

archerzz added a commit to archerzz/typespec that referenced this issue Oct 15, 2024
- add snippets for typespec basic constructs
- package snippets within vs code extension

part of microsoft#4559
@RodgeFu
Copy link
Contributor

RodgeFu commented Oct 16, 2024

I am not sure, the dev cost is low, but my main concern is the maintain cost which is always something we need to think about for releasing something new. Or is it fine if we just make it internal, @archerzz ? I think an private release should be good enough, right?

As for discoverability, I guess we will need to have doc to tell service team what to do/install anyway.

@timotheeguerin
Copy link
Member

the other option too is just to add the snippets to azure rest api spec repo

github-merge-queue bot pushed a commit that referenced this issue Oct 23, 2024
- add snippets for typespec basic constructs
- package snippets within vs code extension

part of #4559
@RodgeFu
Copy link
Contributor

RodgeFu commented Oct 29, 2024

The basic snippets has been added. Keep this open to track the work for snippets especially for azure service.

@timotheeguerin
Copy link
Member

could maybe close this one and create a new one in typespec-azure if its now just azure specific

@archerzz
Copy link
Member Author

could maybe close this one and create a new one in typespec-azure if its now just azure specific

I agree. @RodgeFu Maybe we can create an issue under https://github.com/Azure/typespec-azure?

@RodgeFu
Copy link
Contributor

RodgeFu commented Oct 30, 2024

Yeah, sounds good to me. thanks.

@timotheeguerin
Copy link
Member

Created Azure/typespec-azure#1770

swatkatz pushed a commit to swatkatz/typespec that referenced this issue Nov 5, 2024
- add snippets for typespec basic constructs
- package snippets within vs code extension

part of microsoft#4559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc. triaged:core
Projects
None yet
Development

No branches or pull requests

4 participants