diff --git a/package-lock.json b/package-lock.json index f78e176e..ac869edb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,6 @@ "@types/request": "^2.48.8", "@types/semver": "^7.3.9", "@types/sinon": "^10.0.6", - "@types/vscode": "^1.61.0", "@types/yargs": "^15.0.5", "@typescript-eslint/eslint-plugin": "^5.27.0", "@typescript-eslint/parser": "^5.27.0", @@ -1032,12 +1031,6 @@ "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", "dev": true }, - "node_modules/@types/vscode": { - "version": "1.61.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.61.0.tgz", - "integrity": "sha512-9k5Nwq45hkRwdfCFY+eKXeQQSbPoA114mF7U/4uJXRBJeGIO7MuJdhF1PnaDN+lllL9iKGQtd6FFXShBXMNaFg==", - "dev": true - }, "node_modules/@types/yargs": { "version": "15.0.19", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", diff --git a/package.json b/package.json index f8ad798d..211296d5 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,6 @@ "@types/request": "^2.48.8", "@types/semver": "^7.3.9", "@types/sinon": "^10.0.6", - "@types/vscode": "^1.61.0", "@typescript-eslint/eslint-plugin": "^5.27.0", "@typescript-eslint/parser": "^5.27.0", "@types/yargs": "^15.0.5", diff --git a/src/CompileErrorProcessor.ts b/src/CompileErrorProcessor.ts index a25d9568..cc74f15f 100644 --- a/src/CompileErrorProcessor.ts +++ b/src/CompileErrorProcessor.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events'; import { logger } from './logging'; -import type { Range } from 'brighterscript'; +import type { DiagnosticTag, Range } from 'brighterscript'; import { DiagnosticSeverity, util as bscUtil } from 'brighterscript'; export class CompileErrorProcessor { @@ -372,6 +372,18 @@ export interface BSDebugDiagnostic { * The diagnostic's code, which usually appear in the user interface. */ code?: number | string; + /** + * An optional property to describe the error code. + * Requires the code field (above) to be present/not null. + * + * @since 3.16.0 + */ + codeDescription?: { + /** + * An URI to open with more information about the diagnostic error. + */ + href: string; + }; /** * A human-readable string describing the source of this * diagnostic, e.g. 'typescript' or 'super lint'. It usually @@ -393,6 +405,37 @@ export interface BSDebugDiagnostic { * client to interpret diagnostics as error, warning, info or hint. */ severity?: DiagnosticSeverity; + + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + tags?: DiagnosticTag[]; + /** + * An array of related diagnostic information, e.g. when symbol-names within + * a scope collide all definitions can be marked via this property. + */ + relatedInformation?: Array<{ + /** + * The location of this related diagnostic information. + */ + location: { + uri: string; + range: Range; + }; + /** + * The message of this related diagnostic information. + */ + message: string; + }>; + /** + * A data entry field that is preserved between a `textDocument/publishDiagnostics` + * notification and `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + data?: any; } export enum CompileStatus {