Skip to content

Unable to start LSP in Helix Editor #2131

Closed as duplicate of#2128
Closed as duplicate of#2128
@bitcrshr

Description

@bitcrshr

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:

  1. No workspace folder in initialize request -> LSP mostly works, but does not pick up on C/C++ imports from BridgingHeader.h despite having compile_commmands.json
  2. Workspace folder in initialize request -> LSP fails to start at all, getting this error: 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 to BridgingHeader.h, which is needed for the gpio_num_t type in main/LightbarController.swift. I did also add set(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions