-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 swift support #6831
Add swift support #6831
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @ceopaludetto on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! I think it would be nice to see integration with Zed's outline view, via an outline.scm
file. Also, I don't think we can add any Swift PR until we've discussed what to do about: alex-pinkus/tree-sitter-swift#240
(where_keyword) @keyword | ||
|
||
(parameter | ||
external_name: (simple_identifier) @variable.parameter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a @variable.parameter
, you can see what we do have in syntax.rs
Yeah, the highlight slowness is a big problem as discussed in zed-industries/extensions#139. But can Swift be added behind a feature flag(something like "unstable swift support") until the issue is resolved? |
The slowdown is only one initial load thing according to the author. If that's the case, I'd use this and deal with it. It's still a value add. Can be iterated upon later. |
If there isn't support for feature flags (I haven't checked) then perhaps just have it be off by default in settings. Then the documentation can give the caveats and warning. That way people can use the language without needing the jump through building from source, and the impression isn't given its fully supported. |
We should determine which one is better Cc @matyunya |
Closing this for now. We have a Swift extension for tree-sitter, and language server support for extensions will land soon. |
Can I follow the LSP dev somewhere? |
@maxbrunsfeld is working on it (often in https://zed.dev/channel/language-servers-4159). A prototype landed here: #9085 if you want to take a look. |
This PR adds the Swift tree-sitter grammar copied from nvim-treesitter. It also adds the sourcekit-lsp.
This PR resolves zed-industries/extensions#139
Release Notes: