How to use the vscode-languageclient.RequestType 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 / azuredatastudio-postgresql / src / contracts.ts View on Github external
export namespace DeleteAgentAlertRequest {
	export const type = new RequestType('agent/deletealert');
}

// Operators requests
export namespace AgentOperatorsRequest {
	export const type = new RequestType('agent/operators');
}

export namespace CreateAgentOperatorRequest {
	export const type = new RequestType('agent/createoperator');
}

export namespace UpdateAgentOperatorRequest {
	export const type = new RequestType('agent/updateoperator');
}

export namespace DeleteAgentOperatorRequest {
	export const type = new RequestType('agent/deleteoperator');
}

// Proxies requests
export namespace AgentProxiesRequest {
	export const type = new RequestType('agent/proxies');
}

export namespace CreateAgentProxyRequest {
	export const type = new RequestType('agent/createproxy');
}

export namespace UpdateAgentProxyRequest {
github microsoft / azuredatastudio-postgresql / src / models / contracts / contracts.ts View on Github external
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import {RequestType} from 'vscode-languageclient';
import {Runtime, LinuxDistribution} from '../platform';

// --------------------------------- < Version Request > -------------------------------------------------

// Version request message callback declaration
export namespace VersionRequest {
    export const type = new RequestType('version');
}

// Version response format
export type VersionResult = string;

// -------------------------------  --------------------------------------------------

// Constants interface for each extension
export interface IExtensionConstants {
    // TODO: Fill in interface

    // Definitely dependent on the extension
    extensionName: string;
    invalidServiceFilePath: string;
    serviceName: string;
    extensionConfigSectionName: string;
github forcedotcom / salesforcedx-vscode / packages / salesforcedx-vscode-visualforce / src / extension.ts View on Github external
import {
  ColorPresentationParams,
  ColorPresentationRequest,
  DocumentColorParams,
  DocumentColorRequest
} from 'vscode-languageserver-protocol';
import { telemetryService } from './telemetry';

// tslint:disable-next-line:no-namespace
namespace TagCloseRequest {
  export const type: RequestType<
    TextDocumentPositionParams,
    string,
    any,
    any
  > = new RequestType('html/tag');
}

export async function activate(context: ExtensionContext) {
  const extensionHRStart = process.hrtime();
  const toDispose = context.subscriptions;

  // The server is implemented in node
  const serverModule = context.asAbsolutePath(
    path.join(
      'node_modules',
      '@salesforce',
      'salesforcedx-visualforce-language-server',
      'out',
      'src',
      'visualforceServer.js'
    )
github microsoft / azuredatastudio-postgresql / src / contracts.ts View on Github external
export namespace UpdateAgentOperatorRequest {
	export const type = new RequestType('agent/updateoperator');
}

export namespace DeleteAgentOperatorRequest {
	export const type = new RequestType('agent/deleteoperator');
}

// Proxies requests
export namespace AgentProxiesRequest {
	export const type = new RequestType('agent/proxies');
}

export namespace CreateAgentProxyRequest {
	export const type = new RequestType('agent/createproxy');
}

export namespace UpdateAgentProxyRequest {
	export const type = new RequestType('agent/updateproxy');
}

export namespace DeleteAgentProxyRequest {
	export const type = new RequestType('agent/deleteproxy');
}

// Agent Credentials request
export namespace AgentCredentialsRequest {
	export const type = new RequestType('security/credentials');
}

// Job Schedules requests
github redhat-developer / vscode-java / src / protocol.ts View on Github external
export interface RefactorWorkspaceEdit {
    edit: WorkspaceEdit;
    command?: Command;
    errorMessage?: string;
}

export interface GetRefactorEditParams {
    command: string;
    context: CodeActionParams;
    options: FormattingOptions;
    commandArguments: any[];
}

export namespace GetRefactorEditRequest {
    export const type = new RequestType('java/getRefactorEdit');
}

export interface PackageNode {
    displayName: string;
    uri: string;
    path: string;
    project: string;
    isDefaultPackage: boolean;
    isParentOfSelectedFile: boolean;
}

export interface MoveParams {
    moveKind: string;
    sourceUris: string[];
    params: CodeActionParams;
    destination?: any;
github PowerShell / vscode-powershell / src / features / SelectPSSARules.ts View on Github external
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/

import vscode = require("vscode");
import { LanguageClient, RequestType } from "vscode-languageclient";
import { ICheckboxQuickPickItem, showCheckboxQuickPick } from "../controls/checkboxQuickPick";
import { IFeature } from "../feature";
import { Logger } from "../logging";

export const GetPSSARulesRequestType = new RequestType("powerShell/getPSSARules");
export const SetPSSARulesRequestType = new RequestType("powerShell/setPSSARules");

class RuleInfo {
    public name: string;
    public isEnabled: boolean;
}

export class SelectPSSARulesFeature implements IFeature {

    private command: vscode.Disposable;
    private languageClient: LanguageClient;

    constructor(private log: Logger) {
        this.command = vscode.commands.registerCommand("PowerShell.SelectPSSARules", () => {
            if (this.languageClient === undefined) {
                this.log.writeAndShowError(`<${SelectPSSARulesFeature.name}>: ` +
github redhat-developer / vscode-java / src / protocol.ts View on Github external
constructors: MethodBinding[];
    fields: VariableBinding[];
}

export namespace CheckConstructorStatusRequest {
    export const type = new RequestType('java/checkConstructorsStatus');
}

export interface GenerateConstructorsParams {
    context: CodeActionParams;
    constructors: MethodBinding[];
    fields: VariableBinding[];
}

export namespace GenerateConstructorsRequest {
    export const type = new RequestType('java/generateConstructors');
}

export interface DelegateField {
    field: VariableBinding;
    delegateMethods: MethodBinding[];
}

export interface CheckDelegateMethodsResponse {
    delegateFields: DelegateField[];
}

export namespace CheckDelegateMethodsStatusRequest {
    export const type = new RequestType('java/checkDelegateMethodsStatus');
}

export interface DelegateEntry {
github adamvoss / vscode-yaml / client / src / yamlMain.ts View on Github external
import * as path from 'path';

import { workspace, languages, ExtensionContext, extensions, Uri, Range } from 'vscode';
import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType } from 'vscode-languageclient';
import { activateColorDecorations } from "./colorDecorators";

import * as nls from 'vscode-nls';
let localize = nls.loadMessageBundle();

namespace VSCodeContentRequest {
	export const type: RequestType = new RequestType('vscode/content');
}

namespace ColorSymbolRequest {
	export const type: RequestType = new RequestType('yaml/colorSymbols');
}

export interface ISchemaAssociations {
	[pattern: string]: string[];
}

namespace SchemaAssociationNotification {
	export const type: NotificationType = new NotificationType('json/schemaAssociations');
}

interface IPackageInfo {
	name: string;
	version: string;
	aiKey: string;
}
github microsoft / vscode-lsif-extension / client / src / extension.ts View on Github external
type FileType = 0 | 1 | 2 | 64;

interface FileStat {
	type: FileType;
	ctime: number;
	mtime: number;
	size: number;
}

interface StatFileParams {
	uri: string;
}

namespace StatFileRequest {
	export const type = new RequestType('lsif/statFile');
}

interface ReadFileParams {
	uri: string;
}

namespace ReadFileRequest {
	export const type = new RequestType('lsif/readfile');
}

interface ReadDirectoryParams {
	uri: string;
}

namespace ReadDirectoryRequest {
	export const type = new RequestType('lsif/readDirectory');
github joelday / papyrus-lang / src / papyrus-lang-vscode / src / ClientServer.ts View on Github external
identifer: string;
    files: string[];
}

export interface DocumentScriptInfo {
    identifiers: string[];
    identifierFiles: IdentifierFiles[];
    searchPaths: string[];
}

export interface ProvideDocumentScriptInfoSignature {
    (document: TextDocument, token: CancellationToken): ProviderResult;
}

export const documentScriptInfoRequestType = {
    type: new RequestType(
        'textDocument/scriptInfo'
    ),
};

export interface RegistryInstallPathParams {
    RegKeyName: string;
}

export interface RegistryInstallPathInfo {
    value: string;
    exists: boolean;
}

export const documentRegistryInstallPathRequestType = {
    type: new RequestType(
        'textDocument/registryInstallPath'