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

[Getting started with vscode swift] Formatting Section #705

Open
MahdiBM opened this issue Jun 8, 2024 · 0 comments
Open

[Getting started with vscode swift] Formatting Section #705

MahdiBM opened this issue Jun 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Jun 8, 2024

Is your feature request related to a problem? Please describe

I've been using a combination of VSCode and Xcode on my machine for a year or so now, and IMO the most problematic aspect of using VSCode is the formatting.

Xcode comes with some sane default formatting helpers (e.g. indentation), but VSCode does not come with any by default.

Describe the solution you'd like

A section about formatting which mentions SwiftFormat (repo, extension) and swift-format (repo, extension).

Describe alternatives you've considered

Alternatively, one could leave using VSCode and use Xcode on a macOS device they might not have 😅
Formatting is that important, in my opinion at least.
Having no formatters ruins the whole experience.

Additional context

The fact that the formatting experience is suboptimal in VSCode has been one of the biggest reasons I still use Xcode.
I've made some attempts on improving the formatting experience, but it's still not close enough to Xcode. Including adding format-on-type capability to the VSCode extensions, and even having a local less-stable formatting-related feature to have the Format Selection functionality on VSCode, that i never saw fit to actually propose a PR for (it would work meh/fine, but it was buggy enough to be unfit as a public feature)

Luckily swift-format is going to have "Format Selection" functionality soon, and I or someone else will be able to add support for that to the VSCode extension.

Other than this, I find the article pretty nice and helpful, so thanks to the ones who helped publishing this article.

@MahdiBM MahdiBM added the enhancement New feature or request label Jun 8, 2024
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

1 participant