CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Swift

Last modified: 14 September 2021

Swift is supported in CLion via the Swift plugin. With this plugin installed and enabled, CLion can be used as a fully-functional Swift IDE on Linux, macOS, and Windows (see this blog post for details).

Swift support in CLion includes the following features:

  • Automatic resolve for project dependencies:

    sync project dependencies

  • Swift Package Manager actions available from the Tools | Swift Package Manager menu:

    Swift Package Manager actions
  • Detecting and importing changes:

    import changes
  • Code highlighting and completion in .swift files including completion for project targets in Package.swift:

    completion for project targets
  • Code generation Alt+Insert and refactoring Ctrl+Alt+Shift+T options:

    Generate and Refactor This actions
  • Swift-specific code checks including SourceKit inspections (to configure the inspections, go to Settings/Preferences | Editor | Inspections | Swift):

    Swift code inspections