-
Notifications
You must be signed in to change notification settings - Fork 304
Unable to start LSP in Helix Editor #2131
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
Comments
I think I remember an issue that Helix doesn’t forward environment variables from the system to the LSP server. In either case SourceKit-LSP seems to be picking up Xcode command line tools as the toolchain (search for I thought we had an issue somewhere that we should infer the toolchain from the compiler that’s mentioned din |
I just looked into this further and
Thanks for your help to investigate this. |
Sure thing! I included these as files to save precious vertical space here, but lmk if you're more comfortable with plaintext. Interesting that Helix uses |
Update: Helix works beautifully with sourcekit-lsp on Linux, so I'm thinking this is due to a wonky system environment on my macbook, and not an issue with the lsp or helix. |
Swift version
main-snapshot-2025-04-12
Platform
MacOS 15.0.1
Editor
Helix 25.01.1
Description
Hello!
I have been trying to get sourcekit-lsp to work properly with Helix for a few days, but I haven't been able to crack it. My main use case is embedded Swift with ESP-IDF. There are two scenarios:
compile_commmands.json
2025-04-30T17:58:16.883 helix_lsp::transport [ERROR] sourcekit-lsp <- ServerError(-32001): sourcekitd request failed: error response (Request Failed): Loading the standard library failed
Note that the first scenario is possible because Helix won't consider an open folder a workspace unless it has a
.git
or.helix
directory in it.Seems that the VSCode extension works perfectly, but I wasn't able to find anything that stuck out while comparing the LSP messages to/from Helix vs VSCode.
Any guidance would be greatly appreciated! If this seems to be more of a Helix issue, I'd be happy to make an issue on their side and link here in case anyone else runs into this. I'm pretty new to Swift as well, so this may also simply be a skill issue.
Steps to Reproduce
The project I'm working on is here. It's a copy of swift-matter-examples/empty-template with minimal changes. I did add
<driver/gpio.h>
along with some others toBridgingHeader.h
, which is needed for thegpio_num_t
type inmain/LightbarController.swift
. I did also addset(CMAKE_EXPORT_COMPILE_COMMANDS, ON)
to the root CMakeLists.txt as a sanity check.Logging
sourcekit-lsp-diagnose-2025-04-30T18-09-51-04-00.zip
The text was updated successfully, but these errors were encountered: