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

Update Swift grammar and upstream repository #197470

Merged
merged 4 commits into from
Nov 15, 2023
Merged

Update Swift grammar and upstream repository #197470

merged 4 commits into from
Nov 15, 2023

Conversation

jtbandes
Copy link
Contributor

@jtbandes jtbandes commented Nov 5, 2023

👋 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-grammar script 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.

image

image

image

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 🙂)

@jtbandes
Copy link
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! 🙏

@alexr00 alexr00 assigned alexr00 and unassigned andreamah Nov 14, 2023
@alexr00
Copy link
Member

alexr00 commented Nov 14, 2023

@jtbandes I'm the right person to ping, thanks! I will take a look.

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and for maintaining the Swift grammar! I've just updated the related license files.

@alexr00 alexr00 enabled auto-merge (squash) November 15, 2023 14:35
@alexr00 alexr00 added this to the November 2023 milestone Nov 15, 2023
@alexr00 alexr00 merged commit 6855ba0 into microsoft:main Nov 15, 2023
6 checks passed
@jtbandes jtbandes deleted the update-swift branch November 21, 2023 00:14
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants