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 snippets for VSCode DX #12311

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Add snippets for VSCode DX #12311

merged 2 commits into from
Nov 15, 2024

Conversation

jjspace
Copy link
Contributor

@jjspace jjspace commented Nov 15, 2024

Description

Snippets are a really handy way in VSCode to write common/repetitive chunks of code. I added a few that I've used in the past to make it quicker to add debug pragmas and Check function calls quickly. This list can definitely expand in the future (tests are another really helpful area for this) but just wanted to get it started.

simplescreenrecorder-2024-11-15_11.50.07.mp4

(I specifically really want the debug pragma one because I always forget the syntax and you can't use intellisense for it)

Issue number and link

no issue

Testing plan

  • Use any file in vscode
  • Type the start of the snippets and hit Tab (or your completion key)
  • Try them out

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@jjspace jjspace marked this pull request as ready for review November 15, 2024 16:57
Copy link

Thank you for the pull request, @jjspace!

✅ We can confirm we have a CLA on file for you.

"description": "Insert or wrap selection with debug pragma comments",
"body": [
"//>>includeStart('debug', pragmas.debug);",
"${TM_SELECTED_TEXT}$0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also lets you quickly wrap already existing code if you forgot the pragma.

simplescreenrecorder-2024-11-15_13.36.26.mp4

@ggetz
Copy link
Contributor

ggetz commented Nov 15, 2024

Seems handy. @lukemckinstry Can you take a review pass and merge if happy?

Copy link
Contributor

@lukemckinstry lukemckinstry left a comment

Choose a reason for hiding this comment

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

This is useful, great idea. It this worth a brief note in docs? Perhaps in the CodingGuide or VSCodeGuide?

Once you update with the base branch, this is good to merge.

@lukemckinstry lukemckinstry added this pull request to the merge queue Nov 15, 2024
Merged via the queue into main with commit 91821cc Nov 15, 2024
9 checks passed
@lukemckinstry lukemckinstry deleted the snippets branch November 15, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants