CLion IDE for Swift (Linux & Windows 10)

Hi!

So far people have mentioned vim and VCCode as Swift editors.
I think CLion IDE with Swift plugin also deserves to be mentioned.
If you like JetBrains IDEs (PyCharm, WebStorm, etc.) you’ll feel like home with online inspections, code completion, debugger, automatic code formatting, etc. :slight_smile: It also has basic integration with swift package manager (automatically suggesting compilation targets from Package.swift).
The setup is very simple: just install CLion, install Swift plugin and set path to Swift or S4TF toolchain in plugin settings as described here.

The downside is that this IDE is not free, however they provide free licenses to active opensource contributors and students/teachers. There’s also month-long evaluation period to try.

Now, I’ve mentioned Windows. Native Windows CLion version obviously doesn’t support Swift plugin (as there’s no official toolchain for Win), but if you install Linux version inside WSL, and start via something like MobaXterm, it works :slight_smile: Of course you’ll need to install all the dependencies and Swift toolchain inside WSL. This might seem ugly, but to me it’s better alternative to VM or dual-boot because it has seamless filesystem, UI, and clipboard integration (when you want to keep using Windows for something). Unfortunately, GPU is not available in WSL.

4 Likes

Yes I also like this approach.

I thought that their AppCode supports Swift also. Or is it something that intended to write macOS/iOS apps only?

Yes, AppCode runs only on Mac.

1 Like

BTW, worth mentioning that CLion has the same amount of python support built in as the community version of PyCharm. So one would have everything in one place which seems nicer than switching IDEs permanently…

2 Likes