More lsp stuff / telemetry-prep (#1694)
* more text document stuff Signed-off-by: Jess Frazelle <github@jessfraz.com> * backend for rename and create etc Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates for functions Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * js future Signed-off-by: Jess Frazelle <github@jessfraz.com> * utils Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup send and sync shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * save the client Signed-off-by: Jess Frazelle <github@jessfraz.com> * store the users privacy settings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * bump version Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -20,6 +20,7 @@ import type { Program } from '../wasm-lib/kcl/bindings/Program'
|
||||
import type { Token } from '../wasm-lib/kcl/bindings/Token'
|
||||
import { Coords2d } from './std/sketch'
|
||||
import { fileSystemManager } from 'lang/std/fileSystemManager'
|
||||
import { DEV } from 'env'
|
||||
|
||||
export type { Program } from '../wasm-lib/kcl/bindings/Program'
|
||||
export type { Value } from '../wasm-lib/kcl/bindings/Value'
|
||||
@ -286,23 +287,19 @@ export function programMemoryInit(): ProgramMemory {
|
||||
export async function copilotLspRun(config: ServerConfig, token: string) {
|
||||
try {
|
||||
console.log('starting copilot lsp')
|
||||
await copilot_lsp_run(config, token)
|
||||
await copilot_lsp_run(config, token, DEV)
|
||||
} catch (e: any) {
|
||||
console.log('copilot lsp failed', e)
|
||||
// We make it restart recursively so that if it ever dies after like
|
||||
// 8 hours or something it will come back to life.
|
||||
await copilotLspRun(config, token)
|
||||
// We can't restart here because a moved value, we should do this another way.
|
||||
}
|
||||
}
|
||||
|
||||
export async function kclLspRun(config: ServerConfig) {
|
||||
export async function kclLspRun(config: ServerConfig, token: string) {
|
||||
try {
|
||||
console.log('start kcl lsp')
|
||||
await kcl_lsp_run(config)
|
||||
await kcl_lsp_run(config, token, DEV)
|
||||
} catch (e: any) {
|
||||
console.log('kcl lsp failed', e)
|
||||
// We make it restart recursively so that if it ever dies after like
|
||||
// 8 hours or something it will come back to life.
|
||||
await kclLspRun(config)
|
||||
// We can't restart here because a moved value, we should do this another way.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user