Skip to content
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

Add setting to enable experimental background indexing in SourceKit-LSP #987

Closed
ahoppen opened this issue Jul 29, 2024 · 4 comments
Closed

Comments

@ahoppen
Copy link
Member

ahoppen commented Jul 29, 2024

Could you add a setting that allows background indexing to be enabled? Something like


Experimental: Background Indexing

Enable SourceKit-LSP’s experimental background indexing for SwiftPM projects, providing cross-file functionality without needing to build. This requires SourceKit-LSP bundled with Swift 6.


When enabled, send the following in the initializationOptions of the initialize request.

{
  "backgroundIndexing": true,
  "backgroundPreparationMode": "enabled"
}
@plemarquand
Copy link
Contributor

plemarquand commented Aug 6, 2024

@ahoppen is this functionally equivalent to passing --experimental-feature background-indexing as arguments to the LSP?

plemarquand added a commit to plemarquand/vscode-swift that referenced this issue Aug 6, 2024
Adds a setting that will send `backgroundIndexing: true` along with a
`backgroundPreparationMode` in the SourceKit-LSP initialization request.

The server must be restarted when either of these settings are changed.

Issue: swiftlang#987
@ahoppen
Copy link
Member Author

ahoppen commented Aug 6, 2024

Passing --experimental-feature background-indexing as the command line argument to sourcekit-lsp has the same behavior as "backgroundIndexing": true. We prefer to use the initialization options now because it allows us to remove options. Removing a command line option would cause SourceKit-jLPS to fail to launch.

plemarquand added a commit to plemarquand/vscode-swift that referenced this issue Aug 7, 2024
Adds a setting that will send `backgroundIndexing: true` along with a
`backgroundPreparationMode` in the SourceKit-LSP initialization request.

The server must be restarted when either of these settings are changed.

Issue: swiftlang#987
plemarquand added a commit that referenced this issue Aug 9, 2024
Add setting for background indexing

Adds a setting that will send `backgroundIndexing: true` along with a
`backgroundPreparationMode` in the SourceKit-LSP initialization request.

The server must be restarted when either of these settings are changed.

Issue: #987
@plemarquand
Copy link
Contributor

Fixed in #992

@plemarquand plemarquand added the needs verification Issue has been fixed, but requires verification before closing label Aug 9, 2024
@plemarquand plemarquand reopened this Aug 9, 2024
@award999 award999 assigned award999 and unassigned plemarquand Aug 27, 2024
@award999 award999 removed the needs verification Issue has been fixed, but requires verification before closing label Aug 27, 2024
@award999
Copy link
Contributor

Verified with d6c91dd

@award999 award999 removed their assignment Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants