Skip to content

Commit 5b9fa32

Browse files
chore: generate
1 parent f137782 commit 5b9fa32

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

  • packages/opencode/src/config

packages/opencode/src/config/lsp.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,20 @@ export const Entry = z.union([
1818
}),
1919
])
2020

21-
export const Info = z
22-
.union([z.literal(false), z.record(z.string(), Entry)])
23-
.refine(
24-
(data) => {
25-
if (typeof data === "boolean") return true
26-
const serverIds = new Set(Object.values(LSPServer).map((server) => server.id))
21+
export const Info = z.union([z.literal(false), z.record(z.string(), Entry)]).refine(
22+
(data) => {
23+
if (typeof data === "boolean") return true
24+
const serverIds = new Set(Object.values(LSPServer).map((server) => server.id))
2725

28-
return Object.entries(data).every(([id, config]) => {
29-
if (config.disabled) return true
30-
if (serverIds.has(id)) return true
31-
return Boolean(config.extensions)
32-
})
33-
},
34-
{
35-
error: "For custom LSP servers, 'extensions' array is required.",
36-
},
37-
)
26+
return Object.entries(data).every(([id, config]) => {
27+
if (config.disabled) return true
28+
if (serverIds.has(id)) return true
29+
return Boolean(config.extensions)
30+
})
31+
},
32+
{
33+
error: "For custom LSP servers, 'extensions' array is required.",
34+
},
35+
)
3836

3937
export type Info = z.infer<typeof Info>

0 commit comments

Comments
 (0)