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

Constant sourcekitd timeouts in neovim with inlay hints enabled #2021

Open
stancl opened this issue Feb 28, 2025 · 3 comments
Open

Constant sourcekitd timeouts in neovim with inlay hints enabled #2021

stancl opened this issue Feb 28, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@stancl
Copy link

stancl commented Feb 28, 2025

Swift version

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1) Target: arm64-apple-macosx15.0

Platform

macOS 15.3.1

Editor

Neovim

Description

Hi, my sourcekit LSP keeps crashing/timing out (interrupting typing) in neovim. I ran sourcekit-lsp diagnose and noticed a bunch of "failed" checks relating to inlay hints tests. I tried turning them off using vim.lsp.inlay_hint.enable(false) and that makes the error go away. I'll say there still is some input lag when using this LSP but that's a minor issue in comparison. With inlay hints enabled an error message interrupts typing on essentially every 5 or so keystrokes.

The specific error message is: sourcekit: -32001: sourcekitd request timed out

I'm using just the default config for sourcekit. I also recorded a video reproduction so you can see what this looks like on my end https://asciinema.org/a/n7jOSeE0Cs9J8FUEksm7zruT3

Steps to Reproduce

Even just a hello world — project created by Xcode (seems like some project files are necessary to trigger the LSP) and opened in neovim with the LSP set up with default config.

Logging

log.txt

@stancl stancl added the bug Something isn't working label Feb 28, 2025
@ahoppen
Copy link
Member

ahoppen commented Feb 28, 2025

Synced to Apple’s issue tracker as rdar://145871554

@ahoppen
Copy link
Member

ahoppen commented Mar 1, 2025

Thanks for filing the issue. The lines that look most suspicious to me are Could not set up a build system at but it’s hard to tell what’s going wrong with the redacted logging. Would you be willing to enable extended logging, as described in https://github.com/swiftlang/sourcekit-lsp/blob/25af3dd/Documentation/Diagnose%20Bundle.md#enable-extended-logging, reproduce the issue and attache a new sourcekit-lsp diagnose bundle?

@stancl
Copy link
Author

stancl commented Mar 1, 2025

This should be it: log.txt

Let me know if I did it right, the file still seems free of any specifics though it did go up in size a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants