refactor(lsp): move ty flag to runtime flags (#27610)
This commit is contained in:
@@ -14,6 +14,7 @@ import { which } from "../util/which"
|
||||
import { Module } from "@opencode-ai/core/util/module"
|
||||
import { spawn } from "./launch"
|
||||
import { Npm } from "@opencode-ai/core/npm"
|
||||
import type { RuntimeFlags } from "@/effect/runtime-flags"
|
||||
|
||||
const log = Log.create({ service: "lsp.server" })
|
||||
const pathExists = async (p: string) =>
|
||||
@@ -60,7 +61,7 @@ export interface Info {
|
||||
extensions: string[]
|
||||
global?: boolean
|
||||
root: RootFunction
|
||||
spawn(root: string, ctx: InstanceContext): Promise<Handle | undefined>
|
||||
spawn(root: string, ctx: InstanceContext, flags: RuntimeFlags.Info): Promise<Handle | undefined>
|
||||
}
|
||||
|
||||
export const Deno: Info = {
|
||||
@@ -431,8 +432,8 @@ export const Ty: Info = {
|
||||
"Pipfile",
|
||||
"pyrightconfig.json",
|
||||
]),
|
||||
async spawn(root) {
|
||||
if (!Flag.OPENCODE_EXPERIMENTAL_LSP_TY) {
|
||||
async spawn(root, _ctx, flags) {
|
||||
if (!flags.experimentalLspTy) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user