-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update Swift Grammar and Queries #10802
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
Conversation
|
Regarding your comment at [1] about
Therefore a |
|
That's great to hear @WuerfelDev! Could you elaborate on:
Do you mean the global config? |
A invalid configuration file will return nil therefore not continuing to look for other configuration locations (neither cwd nor global). |
|
As a casual user I just wanted formatting to work on |
This PR includes various improvements for
swiftlanguage.swiftinterfaceto recognised file types as discussed in Support .swiftinterface files #10763I tried to keep them similar to rust/textobjects.scm
demo.mp4
Footnotes
When formatter is invoked using a file path,
it recursively looks for ".swift-formatter" configuration file in the parent directories.
Since helix uses STDIN
swift-formatwon't know where to look for the configuration.This is why
--configuration .swift-formatargument is used explicitly.To enable the formatter for a package:
swift-format dump-configuration > $PACKAGE_ROOT/.swift-format↩Even though slash regex literals have been available since swift 5.7,
they still need to be manually enabled for the target:
swiftSettings: [.unsafeFlags(["-enable-bare-slash-regex"])]↩