Configuration of Noctule#
Build Settings#
There are two types of build settings:
- Default Settings for your project
- Directory Settings for a specific directory
If a directory does not have custom settings, then the projects settings are used.
Project Build Settings#
The build settings are available at Preferences → Build, Execution, Deployment → Swift. The directory settings are available in the nested setting Directory Settings.

- Swift Toolchain
- The Swift toolchain used for the project. It’s used to provide most of the editor features (via SourceKit LSP), to build the project and as the default for run configurations. Directory settings do not allow overriding this setting.
- Default SourceKit LSP Settings
- The default settings that are used for Swift projects. If no custom settings are defined for a directory, then these settings are used as a fallback. Please refer to the explanations of the directory settings to learn more about the available settings.
Directory Build Settings#
By default, each detected Swift PM project directory is shown at Preferences → Build, Execution, Deployment → Swift → Directory Settings.
The list of directories defines the workspace of the Swift Language Server.
On the left, you can select the directory to configure.
On the right, you can configure the build settings for this directory.
The settings are synced with the SourceKit configuration file .sourcekit-lsp/config.json inside the directory.
- Use default project settings:
- This allows configuring if you would like to use the default project settings or if you would like to define custom settings for this directory.
If you choose “Use default project settings”, then
.sourcit-lsp/config.jsonwill be deleted.If you choose “Apply custom settings”, then
.sourcekit-lsp/config.jsonwill be created or updated with the settings defined in the user interface.

Directory Settings Details#
- Workspace Type
- The workspace type to assume for this directory.
- Automatic detection: Let SourceKit LSP detect the workspace type.
- Build server: Use a build server to build the project.
This needs an additional configuration file inside directory
.bspinside the workspace root directory. Noctule currently does not provide support for build server settings. - Compilation database: Use a compilation database to build the project.
This needs an additional configuration file
compile_commands.jsonorcompile_flags.txtinside the workspace root directory. - Swift PM: Use
swiftto build as a Swift Package Manager project. This needs aPackage.swiftfile inside the workspace root directory.
Background Indexing#
- Enable experimental background indexing
- Tells SourceKit LSP to index the project in the background. With Swift 6.1 or later, it’s recommended to enable this and keep the default preparation mode of “Enabled”. Please refer to the documentation if you need more details.
- Preparation Mode
- How background indexing works.
SwiftPM Workspace Settings#
- Swift SDK
- The Swift SDK to use for this workspace. This is helpful for cross-platform development.
The available options are retrieved from the Swift toolchain via
swift sdk list. Available SDKs are listed on the Swift website. - Build Configuration
- Options
DebugandReleaseallow to override the default build configuration of the workspace - Traits
- Traits separated by space, that are passed to the
swiftcommand via option--traits. If this option is set, then the default traits are ignored unless you adddefaultto this list.
Compiler Settings#
The settings allow overriding the default settings of the Swift, C, C++ compiler and also of the linker.