Skip to content

Commit

Permalink
repair state import
Browse files Browse the repository at this point in the history
  • Loading branch information
abentkamp committed Oct 21, 2023
1 parent edf8478 commit a35381d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/editor/leanclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import {
LanguageClientOptions,
PublishDiagnosticsParams,
CloseAction, ErrorAction,
RevealOutputChannelOn
RevealOutputChannelOn,
} from 'monaco-languageclient'
import { State } from 'vscode-languageclient'
import * as ls from 'vscode-languageserver-protocol'
import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'

Expand Down Expand Up @@ -348,16 +349,16 @@ export class LeanClient implements Disposable {
try {
this.client.onDidChangeState(async (s) => {
// see https://github.com/microsoft/vscode-languageserver-node/issues/825
if (s.newState === 3) {
if (s.newState === State.Starting) {
console.log('[LeanClient] starting')
} else if (s.newState === 2) {
} else if (s.newState === State.Running) {
const end = Date.now()
console.log(`[LeanClient] running, started in ${end - startTime} ms`)
this.running = true // may have been auto restarted after it failed.
if (!insideRestart) {
this.restartedEmitter.fire(undefined)
}
} else if (s.newState === 1) {
} else if (s.newState === State.Stopped) {
this.running = false
console.log('[LeanClient] has stopped or it failed to start')
if (!this.noPrompt) {
Expand Down

0 comments on commit a35381d

Please sign in to comment.