You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`.sourcekit-lsp/config.json` configuration files can be used to modify the behavior of SourceKit-LSP in various ways. The following locations are checked. Settings in later configuration files override settings in earlier configuration files
4
+
-`~/.sourcekit-lsp/config.json`
5
+
- On macOS: `~/Library/Application Support/org.swift.sourcekit-lsp/config.json` from the various `Library` folders on the system
6
+
- If the `XDG_CONFIG_HOME` environment variable is set: `$XDG_CONFIG_HOME/sourcekit-lsp/config.json`
7
+
- Initialization options passed in the initialize request
8
+
- A `.sourcekit-lsp/config.json` file in a workspace’s root
9
+
10
+
The structure of the file is currently not guaranteed to be stable. Options may be removed or renamed.
11
+
12
+
## Structure
13
+
14
+
`config.json` is a JSON file with the following structure. All keys are optional and unknown keys are ignored.
15
+
16
+
-`swiftPM`: Dictionary with the following keys, defining options for SwiftPM workspaces
17
+
-`configuration: "debug"|"release"`: The configuration to build the project for during background indexing and the configuration whose build folder should be used for Swift modules if background indexing is disabled. Equivalent to SwiftPM's `--configuration` option.
18
+
-`scratchPath: string`: Build artifacts directory path. If nil, the build system may choose a default value. Equivalent to SwiftPM's `--scratch-path` option.
19
+
-`swiftSDKsDirectory: string`: Equivalent to SwiftPM's `--swift-sdks-path` option
20
+
-`swiftSDK: string`: Equivalent to SwiftPM's `--swift-sdk` option
21
+
-`triple: string`: Equivalent to SwiftPM's `--triple` option
22
+
-`cCompilerFlags: string[]`: Extra arguments passed to the compiler for C files. Equivalent to SwiftPM's `-Xcc` option.
23
+
-`cxxCompilerFlags: string[]`: Extra arguments passed to the compiler for C++ files. Equivalent to SwiftPM's `-Xcxx` option.
24
+
-`swiftCompilerFlags: string[]`: Extra arguments passed to the compiler for Swift files. Equivalent to SwiftPM's `-Xswiftc` option.
25
+
-`linkerFlags: string[]`: Extra arguments passed to the linker. Equivalent to SwiftPM's `-Xlinker` option.
26
+
-`compilationDatabase`: Dictionary with the following keys, defining options for workspaces with a compilation database
27
+
-`searchPaths: string[]`: Additional paths to search for a compilation database, relative to a workspace root.
28
+
-`fallbackBuildSystem`: Dictionary with the following keys, defining options for files that aren't managed by any build system
29
+
-`cCompilerFlags: string[]`: Extra arguments passed to the compiler for C files
30
+
-`cxxCompilerFlags: string[]`: Extra arguments passed to the compiler for C++ files
31
+
-`swiftCompilerFlags: string[]`: Extra arguments passed to the compiler for Swift files
32
+
-`clangdOptions: string[]`: Extra command line arguments passed to `clangd` when launching it
33
+
-`index`: Dictionary with the following keys, defining options related to indexing
34
+
-`indexStorePath: string`: Directory in which a separate compilation stores the index store. By default, inferred from the build system.
35
+
-`indexDatabasePath: string`: Directory in which the indexstore-db should be stored. By default, inferred from the build system.
36
+
-`indexPrefixMap: [string: string]`: Path remappings for remapping index data for local use.
37
+
-`maxCoresPercentageToUseForBackgroundIndexing: double`: A hint indicating how many cores background indexing should use at most (value between 0 and 1). Background indexing is not required to honor this setting
38
+
-`updateIndexStoreTimeout: int`: Number of seconds to wait for an update index store task to finish before killing it.
39
+
-`defaultWorkspaceType: "buildserver"|"compdb"|"swiftpm"`: Overrides workspace type selection logic.
40
+
-`generatedFilesPath: string`: Directory in which generated interfaces and macro expansions should be stored.
41
+
-`experimentalFeatures: string[]`: Experimental features to enable
42
+
-`swiftPublishDiagnosticsDebounce`: The time that `SwiftLanguageService` should wait after an edit before starting to compute diagnostics and sending a `PublishDiagnosticsNotification`.
0 commit comments