Skip to content

Add Zed support to setup - #593

Open
FNDEVVE wants to merge 1 commit into
Effect-TS:mainfrom
FNDEVVE:feat/zed-setup
Open

Add Zed support to setup#593
FNDEVVE wants to merge 1 commit into
Effect-TS:mainfrom
FNDEVVE:feat/zed-setup

Conversation

@FNDEVVE

@FNDEVVE FNDEVVE commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #145.

Adds Zed as a first-class editor target in effect-tsgo setup, following the existing VS Code setup flow while targeting TypeScript 7's native typescript-ls server.

Behavior

  • adds interactive and non-interactive Zed selection, including --zed / --no-zed
  • configures typescript-ls with the current platform package binary and --lsp --stdio
  • makes typescript-ls the TypeScript and TSX server while disabling typescript-language-server and vtsls
  • preserves existing .zed/settings.json JSONC structure, comments, formatting, unrelated LSP configuration, formatter settings, code actions, and explicit server ordering
  • keeps JavaScript and JSX settings untouched
  • aborts with actionable guidance when required Zed containers have incompatible shapes
  • rejects malformed existing editor settings instead of treating them as absent or overwriting them
  • emits restart guidance only when a Zed settings change is produced

Examples

New Zed configuration:

{
  "lsp": {
    "typescript-ls": {
      "binary": {
        "path": "./node_modules/@typescript/typescript-<platform>-<arch>/lib/tsc",
        "arguments": ["--lsp", "--stdio"]
      }
    }
  },
  "languages": {
    "TypeScript": {
      "language_servers": ["typescript-ls", "!typescript-language-server", "!vtsls", "..."]
    },
    "TSX": {
      "language_servers": ["typescript-ls", "!typescript-language-server", "!vtsls", "..."]
    }
  }
}

Existing settings are migrated surgically. For example, Oxlint/Oxfmt configuration, legacy initialization options, comments, trailing commas, and unrelated language-server entries remain intact.

Verification

  • focused setup/config suite: 105 tests passed
  • @effect/tsgo TypeScript check passed
  • root lint passed
  • root check passed
  • root test suite passed: 138 tests
  • migration test verifies valid JSONC output, exact native server configuration, preservation, and byte-identical second apply
  • malformed-file test verifies diagnostics, no overwrite, and no restart guidance
  • git diff --check 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.

On setup, also offer to configure zed editor

1 participant