How to use the vscode-languageclient.State.Running function in vscode-languageclient

To help you get started, we’ve selected a few vscode-languageclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / qsharp-compiler / src / VSCodeExtension / src / languageServer.ts View on Github external
client.onDidChangeState(stateChangeEvent => {
                var states : { [key in State]: string } = {
                    [State.Running]: "running",
                    [State.Starting]: "starting",
                    [State.Stopped]: "stopped"
                };
                console.log(`[qsharp-lsp] State ${states[stateChangeEvent.oldState]} -> ${states[stateChangeEvent.newState]}`);
            })
        );
github kumarharsh / graphql-for-vscode / src / ClientStatusBarItem.ts View on Github external
this._client.onDidChangeState(({ oldState, newState }) => {
      if (newState === State.Running) {
        this._setStatus(Status.ok);
      } else if (newState === State.Stopped) {
        this._setStatus(Status.error);
      }
    });
github prisma-labs / vscode-graphql / src / status / index.ts View on Github external
client.onDidChangeState(event => {
    if (event.newState === State.Running) {
      extensionStatus = Status.RUNNING;
      serverRunning = true;
    } else {
      extensionStatus = Status.ERROR;
      client.info("The graphql server has stopped running");
      serverRunning = false;
    }
    updateStatusBar(statusBarItem, editor);
  });
  updateStatusBar(statusBarItem, editor);
github prograhammer / vscode-tslint-vue / tslint / extension.ts View on Github external
client.onDidChangeState((event) => {
		if (event.newState === ClientState.Running) {
			client.info(running);
			statusBarItem.tooltip = running;
			serverRunning = true;
		} else {
			client.info(stopped);
			statusBarItem.tooltip = stopped;
			serverRunning = false;
		}
		udpateStatusBarVisibility(window.activeTextEditor);
	});
github editor-rs / vscode-rust / src / components / language_client / manager.ts View on Github external
this.languageClient.onDidChangeState(event => {
            if (event.newState === State.Running) {
                this.languageClient.onNotification('rustDocument/diagnosticsBegin', () => {
                    this.statusBarItem.setText('Analysis started');
                });
                this.languageClient.onNotification('rustDocument/diagnosticsEnd', () => {
                    this.statusBarItem.setText('Analysis finished');
                });
            }
        });
    }
github microsoft / qsharp-compiler / src / VSCodeExtension / src / languageServer.ts View on Github external
(event) => {
                if (event.oldState === State.Running && event.newState === State.Stopped) {
                    sendTelemetryEvent(EventNames.lspStopped);
                }
            }
        );
github microsoft / vscode-eslint / client / src / extension.ts View on Github external
client.onDidChangeState((event) => {
		if (event.newState === ClientState.Running) {
			client.info(running);
			statusBarItem.tooltip = running;
			serverRunning = true;
		} else {
			client.info(stopped);
			statusBarItem.tooltip = stopped;
			serverRunning = false;
		}
		updateStatusBarVisibility();
	});
	client.onReady().then(() => {
github marcellourbani / vscode_abap_remote_fs / client / src / langClient.ts View on Github external
client.onDidChangeState(e => {
    if (e.newState === State.Running) {
      client.onRequest(Methods.readConfiguration, configFromKey)
      client.onRequest(Methods.objectDetails, objectDetailFromUrl)
      client.onRequest(Methods.readEditorObjectSource, readEditorObjectSource)
      client.onRequest(Methods.readObjectSourceOrMain, readObjectSource)
      client.onRequest(Methods.vsUri, getVSCodeUri)
      client.onRequest(Methods.setSearchProgress, setSearchProgress)
      client.onRequest(Methods.logCall, logCall)
      client.onRequest(Methods.logHTTP, logHttp)
    }
  })
  client.start()
github jbachhardie / vscode-flow-ls / src / extension.ts View on Github external
client.onDidChangeState(event => {
    if (event.newState === State.Running) {
      client.info('Flow starting')
      statusBar.busy()
    } else {
      client.info('Flow stopped')
      statusBar.stopped()
    }
  })
github latex-lsp / texlab-vscode / src / view.ts View on Github external
public update(state: State) {
    if (state === State.Running) {
      this.drawIcon(Messages.SERVER_RUNNING, Colors.NORMAL);
    } else {
      this.drawIcon(Messages.SERVER_STOPPED, Colors.ERROR);
    }
  }