vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

Question: Should this extension include SwiftFormat? #23

Closed vknabel closed 6 years ago

vknabel commented 6 years ago

The current code formatting is quite limited, but it works on Linux and macOS in the same way.

We could theoretically use nicklockwood/SwiftFormat to handle the code formatting, but in that case Linux and macOS formatting would differ as nicklockwood/SwiftFormat does not support Linux.

As far as I can see, there are some possibilities:

What do you think?

LinusU commented 6 years ago

I've wanted to start using SwiftFormat, it seems awesome 🙌

Personally, I'm not a fan of bundling too many things together. The downside I see of adding it to this package would be that if there ever comes around another tool, it could be hard to try that one out without conflicting with this installation.

One thing that could be very cool, not sure if it's easy to do though, would be to have multiple extensions for VS Code that handles the different parts, e.g. code-completion, formatting and linting, and then also provide one overarching extension that just imports the other ones. That could help with quickly getting up and running, but also allows to swap parts out later.

Just my 2¢ though, but I think I would prefer it as a separate extension ☺️

vknabel commented 6 years ago

Thanks for your opinion! I am not a big fan of putting too much together either. That was actually the reason why I created this issue. In my eyes this extension is responsible to just porting the features of SourceKit to vscode, but it’s formatting is indentation only and hence quite limited. If there is another extension for better formatting, it‘s enough.

I really love your idea of having many extensions and creating an overarching one that just groups all others together (like the formatter or #22)! AFAIK vscode will automatically install allextensionDependencies.

vknabel commented 6 years ago

Closed in favor of vknabel/All-in-One-Swift-for-vscode#1