Update Swift grammar and upstream repository#197470
Merged
alexr00 merged 4 commits intomicrosoft:mainfrom Nov 15, 2023
jtbandes:update-swift
Merged
Update Swift grammar and upstream repository#197470alexr00 merged 4 commits intomicrosoft:mainfrom jtbandes:update-swift
alexr00 merged 4 commits intomicrosoft:mainfrom
jtbandes:update-swift
Conversation
Contributor
Author
|
Hi @alexr00, sorry to bug you directly, but I see you've been involved in updating these grammars previously – is there anything else I can provide to make this review process easier? Thank you! 🙏 |
Member
|
@jtbandes I'm the right person to ping, thanks! I will take a look. |
alexr00
approved these changes
Nov 15, 2023
Member
alexr00
left a comment
There was a problem hiding this comment.
Thanks for the PR and for maintaining the Swift grammar! I've just updated the related license files.
dbaeumer
approved these changes
Nov 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👋 Hi! I'm the maintainer of the Swift language grammar at textmate/swift.tmbundle. Recently, I've migrated development of the grammar over to a new repo under my account at jtbandes/swift-tmlanguage.
This PR changes the
update-grammarscript to point at the new repo, and to update from the .json directly rather than the plist (my repo now includes a .json pre-generated from the canonical .yaml).I've also just implemented some much-needed updates to the grammar, including support for new language features like regular expression literals and macros, as well as improved VS Code compatibility, such as fixes for #134616 & swiftlang/vscode-swift#366 and workarounds for microsoft/vscode-textmate#164 & microsoft/vscode-textmate#140.
I usually do manual testing against my grammar-test.swift file which tries to exercise most of the grammar's features — but let me know if there are any other ways this should be tested before merging.
(One issue I'm aware of is that the Swift language server in the vscode-swift extension uses different scopes for some things, leading to significant color changes when the language server is enabled or disabled. I'm not sure if this is considered a major issue, or perhaps it's common among languages that have both a LSP implementation and a "fallback" extension with a TextMate grammar? Let me know if that's something you'd like me to address or bring up with the vscode-swift extension authors 🙂)