import * as vscode from 'vscode'; import { LanguageClient, RequestType, ProtocolConnection } from 'vscode-languageclient/node'; import { Fast } from '../hdlParser/common'; interface IDigitalIDELspClient { DigitalIDE?: LanguageClient, VhdlClient?: LanguageClient } export const LspClient: IDigitalIDELspClient = { DigitalIDE: undefined, VhdlClient: undefined }; /** * @description 构造请求参数 * RequestType * P: 请求的参数类型。 * R: 请求的响应类型。 * E: 请求的错误类型。 * RO: 请求的可选参数类型。 */ export const CustomRequestType = new RequestType('custom/request'); export const CustomParamRequestType = new RequestType('custom/paramRequest'); export const DoFastRequestType = new RequestType('api/fast'); export const UpdateConfigurationType = new RequestType('api/update-configuration'); export const DoPrimitivesJudgeType = new RequestType('api/do-primitives-judge'); export const SyncFastRequestType = new RequestType('api/sync-fast'); export const LinterStatusRequestType = new RequestType('api/linter-status'); export interface ITextDocumentItem { uri: vscode.Uri, languageId: string, version: number, text: string } export interface ISyncFastParam { path: string, fileType: DoFastFileType, toolChain: DoFastToolChainType } export interface ICommonParam { param: string } export interface IUpdateConfigurationParam { configs: { name: string, value: string | boolean | number }[], configType: string } export interface ILinterStatusParam { languageId: string, linterName: string, linterPath: string } interface LinterToolStatus { toolName: string, available: boolean, invokeName: string } export interface IDoPrimitivesJudgeParam { name: string } export type DoFastFileType = 'common' | 'ip' | 'primitives'; export type DoFastToolChainType = 'xilinx' | 'efinity' | 'intel'; export interface IDoFastParam { path: string, fileType: DoFastFileType, toolChain: DoFastToolChainType }