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 document that shows how to set up experimental background indexing #1416

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

ahoppen
Copy link
Contributor

@ahoppen ahoppen commented Jun 4, 2024

No description provided.

@ahoppen ahoppen requested a review from benlangmuir as a code owner June 4, 2024 03:35
@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test

@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test

Comment on lines 13 to 16
$ git clone sourcekit-lsp
$ swift package update
$ swift build -c release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there meant to be a proper URL for the git clone? Also would it be worth adding a cd? Or is this more meant as pseudocode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was meant to be proper code. Just … didn’t check it.


Next, point your editor to use the just-built copy of SourceKit-LSP and enable background indexing by passing `--experimental-feature background-indexing` to sourcekit-lsp. In VS Code, this can be done by adding the following to your settings.json
```json
"swift.sourcekit-lsp.serverPath": "/path/to/sourcekit-lsp/.build/arm64-apple-macosx/release/sourcekit-lsp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use the .build/release symlink to avoid including the target in the path here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍🏽

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than Hamish's comments

@ahoppen ahoppen force-pushed the background-indexing-document branch from 841c953 to d2c0e49 Compare June 4, 2024 22:20
@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test

@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the background-indexing-document branch from d2c0e49 to 98149dd Compare June 4, 2024 22:21
@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test

@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 4, 2024

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Contributor Author

ahoppen commented Jun 5, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 6d42f07 into swiftlang:main Jun 5, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants