-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0] Add configuration files for SourceKit-LSP #1537
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This extension was added for VS Code but never used. Let’s remove it in favor of workspace-specific configuration files. # Conflicts: # Sources/SourceKitLSP/SourceKitLSPServer.swift
…onfiguration files The idea here is to unify the different ways in which we can currently set options on SourceKit-LSP in a scalable way: Environment variables, command line arguments to `sourcekit-lsp` and initialization options. The idea is that a user can define a `~/.sourcekit-lsp/.sourcekit-lsp` file (we store logs in `~/.sourcekit-lsp/logs` on non-Darwin platforms), which will be used as the default configuration for all SourceKit-LSP instances. They can also place a `.sourcekit-lsp` file in the root of a workspace to configure SourceKit-LSP for that project specifically, eg. setting arguments that need to be passed to `swift build` for that project and which thus also need to be set on SourceKit-LSP. For compatibility reasons, I’m mapping the existing command line options into the new options structure for now. I hope to delete the command line arguments in the future and solely rely on `.sourcekit-lsp` configuration files. Environment variable will be migrated to `.sourcekit-lsp` in a follow-up commit. # Conflicts: # Sources/SourceKitLSP/SourceKitLSPServer+Options.swift # Sources/SourceKitLSP/Swift/SwiftLanguageService.swift # Sources/sourcekit-lsp/SourceKitLSP.swift # Tests/SourceKitLSPTests/BackgroundIndexingTests.swift # Tests/SourceKitLSPTests/ExecuteCommandTests.swift
We previously always assumed that the project was being built for the host. Fixes swiftlang#786 Fixes swiftlang#1475 rdar://129662080 rdar://113099964
This allows us to flip the default in the future more easily. It also allows users to disable background indexing when it’s enabled by default. rdar://130280855 # Conflicts: # Tests/SourceKitLSPTests/BackgroundIndexingTests.swift
This allows editors to provide UI elements to toggle SourceKit-LSP options. # Conflicts: # Sources/SourceKitLSP/Swift/SwiftLanguageService.swift
The reverse-DNS notation is macOS style and doesn’t feel at home on Linux.
@swift-ci Please test |
ahoppen
changed the title
Add configuration files for SourceKit-LSP
[6.0] Add configuration files for SourceKit-LSP
Jun 29, 2024
This fixes a test failure when running tests using Xcode 15.4.
@swift-ci Please test |
@swift-ci Please test Windows |
@swift-ci Please test Linux |
bnbarham
approved these changes
Jul 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
swift-for-wasm-examples
package #1475, rdar://129662080, rdar://113099964, rdar://130280855SourceKitLSPOptions
#1533, Allow specification of SourceKitLSPOptions in the initialize request and look for SourceKit-LSP options in$XDG_CONFIG_HOME/sourcekit-lsp
#1534, Fix a compilation issue caused by #1533 and #1524 racing #1536