Skip to content

The integration with Elm LS doesn't work when Zed opened in idiomatic way #5

@Janiczek

Description

@Janiczek

This might be a more over-arching Zed issue rather than one specific to this extension.

Steps to reproduce:

  1. Open Zed on macOS via Spotlight or opening the Zed.app application via doubleclick.
  2. File -> Open (Cmd+O)
  3. Locate the project root, open it
  4. Try to save an Elm file

✅ Expected: A file gets reformatted.
❌ Actual: File stays as-is, an error gets shown in the status bar + logs:

2025-05-19T09:32:26+02:00 INFO  [project.lsp_format] Formatting via LSP
2025-05-19T09:32:26+02:00 ERROR [project::lsp_store] Formatting failed: failed to format via language server: Request textDocument/formatting failed with message: No Elm workspace contains /Users/martin/Localhost/cara/compiler/src/AST/Frontend.elm
2025-05-19T09:32:26+02:00 ERROR [editor] failed to format via language server

Caused by:
    Request textDocument/formatting failed with message: No Elm workspace contains /Users/martin/Localhost/cara/compiler/src/AST/Frontend.elm

Workaround / what's wrong

When I instead open Zed by opening my terminal in the project root and running zed ., everything works correctly (formatting, diagnostics, etc.)

It's surprising (a bug?) that the "open" action from an already opened Zed application isn't the same thing as doing zed ., with regards to (I presume) the current working directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions