Drop LSP config Zod statics (#26920)

This commit is contained in:
Kit Langton
2026-05-11 16:11:11 -04:00
committed by GitHub
parent 45adfedd64
commit c060c436b6
2 changed files with 3 additions and 23 deletions

View File

@@ -1,13 +1,11 @@
export * as ConfigLSP from "./lsp"
import { Schema } from "effect"
import { zod } from "@opencode-ai/core/effect-zod"
import { withStatics } from "@opencode-ai/core/schema"
import * as LSPServer from "../lsp/server"
export const Disabled = Schema.Struct({
disabled: Schema.Literal(true),
}).pipe(withStatics((s) => ({ zod: zod(s) })))
}).pipe((schema) => schema)
export const Entry = Schema.Union([
Disabled,
@@ -18,7 +16,7 @@ export const Entry = Schema.Union([
env: Schema.optional(Schema.Record(Schema.String, Schema.String)),
initialization: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
}),
]).pipe(withStatics((s) => ({ zod: zod(s) })))
]).pipe((schema) => schema)
/**
* For custom (non-builtin) LSP server entries, `extensions` is required so the
@@ -40,6 +38,6 @@ export const requiresExtensionsForCustomServers = Schema.makeFilter<
export const Info = Schema.Union([Schema.Boolean, Schema.Record(Schema.String, Entry)])
.check(requiresExtensionsForCustomServers)
.pipe(withStatics((s) => ({ zod: zod(s) })))
.pipe((schema) => schema)
export type Info = Schema.Schema.Type<typeof Info>