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 configuration option to only run swift format when a .swiftformat file exists #20

Closed
adam-fowler opened this issue Apr 5, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@adam-fowler
Copy link

I'd like to enable this extension universally, but it means if I work on a project which isn't using swift format it applies the default formatting to it when I'd rather it did nothing. The existence of a .swiftformat file is a pretty good indicator that swift format is being used.

Can we add a configuration option to only run swift format is a .swiftformat file exists in the base of the project

@vknabel vknabel self-assigned this Apr 5, 2022
@vknabel vknabel added the enhancement New feature or request label Apr 5, 2022
@vknabel
Copy link
Owner

vknabel commented Apr 5, 2022

Thanks for the great suggestion!
I'll try to implement this within the next two weeks.

@vknabel
Copy link
Owner

vknabel commented Apr 23, 2022

Has been released as 1.4.0.

Within the next few minutes, I will also publish updates for vknabel/vscode-apple-swift-format and vknabel/vscode-swiftlint which implement the same feature.

{
  "swiftformat.onlyEnableWithConfig": true,
  "apple-swift-format.onlyEnableWithConfig": true,
  "swiftlint.onlyEnableWithConfig": true
}

@vknabel vknabel closed this as completed Apr 23, 2022
vknabel added a commit to vknabel/vscode-swiftlint that referenced this issue Apr 23, 2022
vknabel added a commit to vknabel/vscode-apple-swift-format that referenced this issue Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants