How to use the vscode-languageclient.ExecuteCommandRequest.type 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 SonarSource / sonarlint-vscode / src / extension.ts View on Github external
return languageClient.onReady().then(async () => {
        const params: ExecuteCommandParams = {
          command: 'SonarLint.RefreshDiagnostics',
          arguments: refreshArgs
        };
        return languageClient.sendRequest(ExecuteCommandRequest.type, params);
      });
    }
github scalameta / metals-vscode / src / extension.ts View on Github external
registerCommand(params.command, () => {
              client.sendRequest(ExecuteCommandRequest.type, {
                command: params.command
              });
            });
          }
github wurstscript / wurst4vscode / src / features / commands.ts View on Github external
}))
				.then(uris => uris.map(uri => uri.path))
			mapPromise = window.showQuickPick(items)
		}
		let mappath = await mapPromise;
		if (!mappath) {
			return Promise.reject("No map selected.");
		}

		let request: ExecuteCommandParams = {
			command: "wurst.buildmap",
			arguments: [{
				'mappath': mappath
			}]
		};
		return client.sendRequest(ExecuteCommandRequest.type, request)
	};
github stylelint / vscode-stylelint / index.js View on Github external
const textEditor = Window.activeTextEditor;

			if (!textEditor) {
				return;
			}

			const textDocument = {
				uri: textEditor.document.uri.toString(),
				version: textEditor.document.version,
			};
			const params = {
				command: 'stylelint.applyAutoFix',
				arguments: [textDocument],
			};

			client.sendRequest(ExecuteCommandRequest.type, params).then(undefined, () => {
				Window.showErrorMessage(
					'Failed to apply styleint fixes to the document. Please consider opening an issue with steps to reproduce.',
				);
			});
		}),
	);
github wurstscript / wurst4vscode / src / features / commands.ts View on Github external
let reloadMap = async (args: any[]) => {
		let config = vscode.workspace.getConfiguration("wurst");

		let request: ExecuteCommandParams = {
			command: "wurst.hotreload",
			arguments: [{
			}]
		};
		return client.sendRequest(ExecuteCommandRequest.type, request)
	};
github microsoft / vscode-eslint / client / src / extension.ts View on Github external
Commands.registerCommand('eslint.executeAutofix', () => {
			const textEditor = Window.activeTextEditor;
			if (!textEditor) {
				return;
			}
			const textDocument: VersionedTextDocumentIdentifier = {
				uri: textEditor.document.uri.toString(),
				version: textEditor.document.version
			};
			const params: ExecuteCommandParams = {
				command: 'eslint.applyAllFixes',
				arguments: [textDocument]
			};
			client.sendRequest(ExecuteCommandRequest.type, params).then(undefined, () => {
				Window.showErrorMessage('Failed to apply ESLint fixes to the document. Please consider opening an issue with steps to reproduce.');
			});
		}),
		Commands.registerCommand('eslint.showOutputChannel', () => { client.outputChannel.show(); }),
github scalameta / metals-vscode / src / extension.ts View on Github external
registerCommand("metals-echo-command", (arg: string) => {
      client.sendRequest(ExecuteCommandRequest.type, {
        command: arg
      });
    });