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 snakecase to snippets syntax #237110

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joeriddles
Copy link

@joeriddles joeriddles commented Dec 31, 2024

closes #233798

Implement /snakecase transformer for editor snippets.

Can be tested using the example in linked issue.

@joeriddles
Copy link
Author

@microsoft-github-policy-service agree

@joeriddles joeriddles changed the title Add snakecase snippets Add snakecase to snippets syntax Dec 31, 2024
@AlejandroFuentes01
Copy link

The changes introduced in PR 237110 add the /snakecase transformation to snippets, enhancing the flexibility of text formatting within the editor:

Modified snippets.tmLanguage.json to include snakecase.
Updated snippet.md to document the new snakecase option.
Added _toSnakeCase method in snippetParser.ts.
Added test cases for snakecase in snippetParser.test.ts.
These changes will allow users to convert text to snake_case format in their snippets, improving the overall functionality and customization of the editor.

Copy link

@AlejandroFuentes01 AlejandroFuentes01 left a comment

Choose a reason for hiding this comment

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

The implementation of the /snakecase transformation in the snippet functionality is well-executed. The changes are clearly documented, the new method _toSnakeCase is efficiently implemented, and comprehensive test cases ensure reliability. This addition enhances the flexibility of text formatting in snippets. Approved.

Choose a reason for hiding this comment

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

Modification: Added test cases for the snakecase transformation.

Choose a reason for hiding this comment

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

Change: No diff generated, but the file is marked as modified.
Impact: Likely includes the addition of the snakecase transformation rule.

Choose a reason for hiding this comment

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

Modification: Added snakecase to the list of supported transformations.

Choose a reason for hiding this comment

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

Modification: Added the _toSnakeCase method and integrated it into the FormatString class.

@joeriddles
Copy link
Author

@jrieken is there anyway to disable outside comments? Looks like there are some spam accounts commenting repeatedly on this PR.

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.

Add snake_case to transform grammar in snippets
3 participants