mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Avoid using metadata.js in build.js
This commit is contained in:
parent
f1be014b8f
commit
3a6cbe0787
6 changed files with 966 additions and 1006 deletions
|
|
@ -17,22 +17,22 @@ tsc(`src/tsconfig.json`);
|
|||
|
||||
dts(
|
||||
`out/amd/language/css/monaco.contribution.d.ts`,
|
||||
`out/release/language/css/monaco.d.ts`,
|
||||
`out/release/css.d.ts`,
|
||||
'monaco.languages.css'
|
||||
);
|
||||
dts(
|
||||
`out/amd/language/html/monaco.contribution.d.ts`,
|
||||
`out/release/language/html/monaco.d.ts`,
|
||||
`out/release/html.d.ts`,
|
||||
'monaco.languages.html'
|
||||
);
|
||||
dts(
|
||||
`out/amd/language/json/monaco.contribution.d.ts`,
|
||||
`out/release/language/json/monaco.d.ts`,
|
||||
`out/release/json.d.ts`,
|
||||
'monaco.languages.json'
|
||||
);
|
||||
dts(
|
||||
`out/amd/language/typescript/monaco.contribution.d.ts`,
|
||||
`out/release/language/typescript/monaco.d.ts`,
|
||||
`out/release/typescript.d.ts`,
|
||||
'monaco.languages.typescript'
|
||||
);
|
||||
|
||||
|
|
|
|||
114
build/release.js
114
build/release.js
|
|
@ -5,12 +5,6 @@
|
|||
|
||||
//@ts-check
|
||||
|
||||
/**
|
||||
* @typedef { { src:string; built:string; releaseDev:string; releaseMin:string; } } ICorePaths
|
||||
* @typedef { { dev:string; min:string; esm: string; } } IPluginPaths
|
||||
* @typedef { { name:string; contrib:string; modulePrefix:string; rootPath:string; paths:IPluginPaths } } IPlugin
|
||||
* @typedef { { METADATA: {CORE:{paths:ICorePaths}; PLUGINS:IPlugin[];} } } IMetadata
|
||||
*/
|
||||
/** @typedef {import('../build/utils').IFile} IFile */
|
||||
|
||||
const path = require('path');
|
||||
|
|
@ -18,8 +12,6 @@ const fs = require('fs');
|
|||
const { REPO_ROOT, readFiles, writeFiles } = require('../build/utils');
|
||||
const { removeDir } = require('../build/fs');
|
||||
const ts = require('typescript');
|
||||
/**@type { IMetadata } */
|
||||
const metadata = require('../metadata.js');
|
||||
const { generateMetadata } = require('./releaseMetadata');
|
||||
|
||||
removeDir(`release`);
|
||||
|
|
@ -85,24 +77,11 @@ function AMD_releaseOne(type) {
|
|||
AMD_addPluginContribs(type, coreFiles);
|
||||
writeFiles(coreFiles, `release/${type}`);
|
||||
|
||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
||||
AMD_releasePlugin(plugin, type, `release/${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Release a plugin to `dev` or `min`.
|
||||
* @param {IPlugin} plugin
|
||||
* @param {'dev'|'min'} type
|
||||
* @param {string} destinationPath
|
||||
*/
|
||||
function AMD_releasePlugin(plugin, type, destinationPath) {
|
||||
const pluginPath = path.join(plugin.rootPath, plugin.paths[type]); // dev or min
|
||||
const contribPath =
|
||||
path.join(pluginPath, plugin.contrib.substring(plugin.modulePrefix.length)) + '.js';
|
||||
|
||||
const files = readFiles(`${pluginPath}/**/*`, { base: pluginPath, ignore: [contribPath] });
|
||||
writeFiles(files, path.join(destinationPath, plugin.modulePrefix));
|
||||
const pluginFiles = readFiles(`out/release/${type}/**/*`, {
|
||||
base: `out/release/${type}`,
|
||||
ignore: ['**/monaco.contribution.js']
|
||||
});
|
||||
writeFiles(pluginFiles, `release/${type}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -125,25 +104,21 @@ function AMD_addPluginContribs(type, files) {
|
|||
// Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
|
||||
contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"');
|
||||
|
||||
/** @type {string[]} */
|
||||
let extraContent = [];
|
||||
/** @type {string[]} */
|
||||
let allPluginsModuleIds = [];
|
||||
const pluginFiles = readFiles(`out/release/${type}/**/monaco.contribution.js`, {
|
||||
base: `out/release/${type}`
|
||||
});
|
||||
|
||||
metadata.METADATA.PLUGINS.forEach(function (plugin) {
|
||||
allPluginsModuleIds.push(plugin.contrib);
|
||||
const pluginPath = path.join(plugin.rootPath, plugin.paths[type]); // dev or min
|
||||
const contribPath =
|
||||
path.join(REPO_ROOT, pluginPath, plugin.contrib.substring(plugin.modulePrefix.length)) +
|
||||
'.js';
|
||||
let contribContents = fs.readFileSync(contribPath).toString();
|
||||
const extraContent = pluginFiles.map((file) => {
|
||||
return file.contents
|
||||
.toString()
|
||||
.replace(
|
||||
/define\((['"][a-z\/\-]+\/fillers\/monaco-editor-core['"]),\[\],/,
|
||||
"define($1,['vs/editor/editor.api'],"
|
||||
);
|
||||
});
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
/define\((['"][a-z\/\-]+\/fillers\/monaco-editor-core['"]),\[\],/,
|
||||
"define($1,['vs/editor/editor.api'],"
|
||||
);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
const allPluginsModuleIds = pluginFiles.map((file) => {
|
||||
return file.path.replace(/\.js$/, '');
|
||||
});
|
||||
|
||||
extraContent.push(
|
||||
|
|
@ -176,22 +151,16 @@ function ESM_release() {
|
|||
ESM_addPluginContribs(coreFiles);
|
||||
writeFiles(coreFiles, `release/esm`);
|
||||
|
||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
||||
ESM_releasePlugin(plugin, `release/esm`);
|
||||
}
|
||||
ESM_releasePlugins();
|
||||
}
|
||||
|
||||
/**
|
||||
* Release a plugin to `esm`.
|
||||
* Adds a dependency to 'vs/editor/editor.api' in contrib files in order for `monaco` to be defined.
|
||||
* Rewrites imports for 'monaco-editor-core/**'
|
||||
* @param {IPlugin} plugin
|
||||
* @param {string} destinationPath
|
||||
*/
|
||||
function ESM_releasePlugin(plugin, destinationPath) {
|
||||
const pluginPath = path.join(plugin.rootPath, plugin.paths['esm']);
|
||||
|
||||
const files = readFiles(`${pluginPath}/**/*`, { base: pluginPath });
|
||||
function ESM_releasePlugins() {
|
||||
const files = readFiles(`out/release/esm/**/*`, { base: 'out/release/esm/' });
|
||||
|
||||
for (const file of files) {
|
||||
if (!/(\.js$)|(\.ts$)/.test(file.path)) {
|
||||
|
|
@ -217,10 +186,9 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
|||
importText = 'monaco-editor-core/esm/vs/editor/editor.api';
|
||||
}
|
||||
|
||||
const myFileDestPath = path.join(plugin.modulePrefix, file.path);
|
||||
const importFilePath = importText.substring('monaco-editor-core/esm/'.length);
|
||||
let relativePath = path
|
||||
.relative(path.dirname(myFileDestPath), importFilePath)
|
||||
.relative(path.dirname(file.path), importFilePath)
|
||||
.replace(/\\/g, '/');
|
||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||
relativePath = './' + relativePath;
|
||||
|
|
@ -238,9 +206,8 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
|||
continue;
|
||||
}
|
||||
|
||||
const myFileDestPath = path.join(plugin.modulePrefix, file.path);
|
||||
const apiFilePath = 'vs/editor/editor.api';
|
||||
let relativePath = path.relative(path.dirname(myFileDestPath), apiFilePath).replace(/\\/g, '/');
|
||||
let relativePath = path.relative(path.dirname(file.path), apiFilePath).replace(/\\/g, '/');
|
||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||
relativePath = './' + relativePath;
|
||||
}
|
||||
|
|
@ -251,7 +218,7 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
|||
}
|
||||
|
||||
ESM_addImportSuffix(files);
|
||||
writeFiles(files, path.join(destinationPath, plugin.modulePrefix));
|
||||
writeFiles(files, `release/esm`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -299,20 +266,20 @@ function ESM_addPluginContribs(files) {
|
|||
|
||||
const mainFileDestPath = 'vs/editor/editor.main.js';
|
||||
|
||||
/** @type {string[]} */
|
||||
let mainFileImports = [];
|
||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
||||
const contribDestPath = plugin.contrib;
|
||||
|
||||
const mainFileImports = readFiles(`out/release/esm/**/monaco.contribution.js`, {
|
||||
base: `out/release/esm`
|
||||
}).map((file) => {
|
||||
let relativePath = path
|
||||
.relative(path.dirname(mainFileDestPath), contribDestPath)
|
||||
.replace(/\\/g, '/');
|
||||
.relative(path.dirname(mainFileDestPath), file.path)
|
||||
.replace(/\\/g, '/')
|
||||
.replace(/\.js$/, '');
|
||||
|
||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||
relativePath = './' + relativePath;
|
||||
}
|
||||
|
||||
mainFileImports.push(relativePath);
|
||||
}
|
||||
return relativePath;
|
||||
});
|
||||
|
||||
const mainFileContents =
|
||||
mainFileImports.map((name) => `import '${name}';`).join('\n') +
|
||||
|
|
@ -335,17 +302,10 @@ function releaseDTS() {
|
|||
|
||||
let contents = monacodts.contents.toString();
|
||||
|
||||
/** @type {string[]} */
|
||||
const extraContent = [];
|
||||
metadata.METADATA.PLUGINS.forEach(function (plugin) {
|
||||
const dtsPath = path.join(plugin.rootPath, './monaco.d.ts');
|
||||
try {
|
||||
let plugindts = fs.readFileSync(dtsPath).toString();
|
||||
plugindts = plugindts.replace(/\/\/\/ <reference.*\n/m, '');
|
||||
extraContent.push(plugindts);
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
const extraContent = readFiles('out/release/*.d.ts', {
|
||||
base: 'out/release/'
|
||||
}).map((file) => {
|
||||
return file.contents.toString().replace(/\/\/\/ <reference.*\n/m, '');
|
||||
});
|
||||
|
||||
contents =
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ function buildESM(options) {
|
|||
},
|
||||
external: options.external,
|
||||
outbase: `src/${options.base}`,
|
||||
outdir: `out/release/${options.base}/esm/`,
|
||||
outdir: `out/release/esm/vs/${options.base}/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
|
||||
|
|
@ -183,7 +183,7 @@ function buildOneAMD(type, options) {
|
|||
js: 'return moduleExports;\n});'
|
||||
},
|
||||
outbase: `src/${options.base}`,
|
||||
outdir: `out/release/${options.base}/${type}/`,
|
||||
outdir: `out/release/${type}/vs/${options.base}/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
||||
|
|
|
|||
50
metadata.js
50
metadata.js
|
|
@ -15,65 +15,65 @@
|
|||
name: 'monaco-typescript',
|
||||
contrib: 'vs/language/typescript/monaco.contribution',
|
||||
modulePrefix: 'vs/language/typescript',
|
||||
rootPath: './out/release/language/typescript',
|
||||
rootPath: './out/release',
|
||||
paths: {
|
||||
// use ./ to indicate it is relative to the `rootPath`
|
||||
src: './../../../amd/language/typescript',
|
||||
dev: './dev',
|
||||
min: './min',
|
||||
esm: './esm'
|
||||
src: './../amd/language/typescript',
|
||||
dev: './dev/vs/language/typescript',
|
||||
min: './min/vs/language/typescript',
|
||||
esm: './esm/vs/language/typescript'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'monaco-css',
|
||||
contrib: 'vs/language/css/monaco.contribution',
|
||||
modulePrefix: 'vs/language/css',
|
||||
rootPath: './out/release/language/css',
|
||||
rootPath: './out/release',
|
||||
paths: {
|
||||
// use ./ to indicate it is relative to the `rootPath`
|
||||
src: './../../../amd/language/css',
|
||||
dev: './dev',
|
||||
min: './min',
|
||||
esm: './esm'
|
||||
src: './../amd/language/css',
|
||||
dev: './dev/vs/language/css',
|
||||
min: './min/vs/language/css',
|
||||
esm: './esm/vs/language/css'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'monaco-json',
|
||||
contrib: 'vs/language/json/monaco.contribution',
|
||||
modulePrefix: 'vs/language/json',
|
||||
rootPath: './out/release/language/json',
|
||||
rootPath: './out/release',
|
||||
paths: {
|
||||
// use ./ to indicate it is relative to the `rootPath`
|
||||
src: './../../../amd/language/json',
|
||||
dev: './dev',
|
||||
min: './min',
|
||||
esm: './esm'
|
||||
src: './../amd/language/json',
|
||||
dev: './dev/vs/language/json',
|
||||
min: './min/vs/language/json',
|
||||
esm: './esm/vs/language/json'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'monaco-html',
|
||||
contrib: 'vs/language/html/monaco.contribution',
|
||||
modulePrefix: 'vs/language/html',
|
||||
rootPath: './out/release/language/html',
|
||||
rootPath: './out/release',
|
||||
paths: {
|
||||
// use ./ to indicate it is relative to the `rootPath`
|
||||
src: './../../../amd/language/html',
|
||||
dev: './dev',
|
||||
min: './min',
|
||||
esm: './esm'
|
||||
src: './../amd/language/html',
|
||||
dev: './dev/vs/language/html',
|
||||
min: './min/vs/language/html',
|
||||
esm: './esm/vs/language/html'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'monaco-languages',
|
||||
contrib: 'vs/basic-languages/monaco.contribution',
|
||||
modulePrefix: 'vs/basic-languages',
|
||||
rootPath: './out/release/basic-languages',
|
||||
rootPath: './out/release',
|
||||
paths: {
|
||||
// use ./ to indicate it is relative to the `rootPath`
|
||||
src: './../../amd/basic-languages',
|
||||
dev: './dev',
|
||||
min: './min',
|
||||
esm: './esm'
|
||||
src: './../amd/basic-languages',
|
||||
dev: './dev/vs/basic-languages',
|
||||
min: './min/vs/basic-languages',
|
||||
esm: './esm/vs/basic-languages'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -7128,6 +7128,455 @@ declare namespace monaco.worker {
|
|||
|
||||
//dtsv=3
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: {
|
||||
[providerId: string]: CSSDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
readonly insertSpaces: boolean;
|
||||
readonly wrapLineLength: number;
|
||||
readonly unformatted: string;
|
||||
readonly contentUnformatted: string;
|
||||
readonly indentInnerHtml: boolean;
|
||||
readonly preserveNewLines: boolean;
|
||||
readonly maxPreserveNewLines: number | undefined;
|
||||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
}
|
||||
export interface CompletionConfiguration {
|
||||
readonly [providerId: string]: boolean;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
*/
|
||||
readonly format?: HTMLFormatConfiguration;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
/**
|
||||
* Configures the HTML data types known by the HTML langauge service.
|
||||
*/
|
||||
readonly data?: HTMLDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const htmlLanguageService: LanguageServiceRegistration;
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorLanguageService: LanguageServiceRegistration;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
export interface LanguageServiceRegistration extends IDisposable {
|
||||
readonly defaults: LanguageServiceDefaults;
|
||||
}
|
||||
/**
|
||||
* Registers a new HTML language service for the languageId.
|
||||
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
||||
*
|
||||
* Use this method to register additional language ids with a HTML service.
|
||||
* The language server has to be registered before an editor model is opened.
|
||||
*/
|
||||
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
||||
export interface HTMLDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard HTML tags and attributes are shown
|
||||
*/
|
||||
readonly useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
readonly dataProviders?: {
|
||||
[providerId: string]: HTMLDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom HTML tags attributes and attribute values
|
||||
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface HTMLDataV1 {
|
||||
readonly version: 1 | 1.1;
|
||||
readonly tags?: ITagData[];
|
||||
readonly globalAttributes?: IAttributeData[];
|
||||
readonly valueSets?: IValueSet[];
|
||||
}
|
||||
export interface IReference {
|
||||
readonly name: string;
|
||||
readonly url: string;
|
||||
}
|
||||
export interface ITagData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly attributes: IAttributeData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IAttributeData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly valueSet?: string;
|
||||
readonly values?: IValueData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueSet {
|
||||
readonly name: string;
|
||||
readonly values: IValueData[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
readonly kind: MarkupKind;
|
||||
readonly value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
* If set, the validator will be enabled and perform syntax and schema based validation,
|
||||
* unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
|
||||
*/
|
||||
readonly validate?: boolean;
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
* `DiagnosticsOptions.allowComments` will override this setting.
|
||||
*/
|
||||
readonly allowComments?: boolean;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly schemas?: {
|
||||
/**
|
||||
* The URI of the schema, which is also the identifier of the schema.
|
||||
*/
|
||||
readonly uri: string;
|
||||
/**
|
||||
* A list of glob patterns that describe for which file URIs the JSON schema will be used.
|
||||
* '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
|
||||
* For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
|
||||
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
|
||||
*/
|
||||
readonly fileMatch?: string[];
|
||||
/**
|
||||
* The schema for the given URI.
|
||||
*/
|
||||
readonly schema?: any;
|
||||
}[];
|
||||
/**
|
||||
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
||||
*/
|
||||
readonly enableSchemaRequest?: boolean;
|
||||
/**
|
||||
* The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaValidation?: SeverityLevel;
|
||||
/**
|
||||
* The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaRequest?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
|
||||
*/
|
||||
readonly trailingCommas?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
|
||||
*/
|
||||
readonly comments?: SeverityLevel;
|
||||
}
|
||||
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in tokens provider is enabled.
|
||||
*/
|
||||
readonly tokens?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const jsonDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -7520,452 +7969,3 @@ declare namespace monaco.languages.typescript {
|
|||
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: {
|
||||
[providerId: string]: CSSDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
* If set, the validator will be enabled and perform syntax and schema based validation,
|
||||
* unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
|
||||
*/
|
||||
readonly validate?: boolean;
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
* `DiagnosticsOptions.allowComments` will override this setting.
|
||||
*/
|
||||
readonly allowComments?: boolean;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly schemas?: {
|
||||
/**
|
||||
* The URI of the schema, which is also the identifier of the schema.
|
||||
*/
|
||||
readonly uri: string;
|
||||
/**
|
||||
* A list of glob patterns that describe for which file URIs the JSON schema will be used.
|
||||
* '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
|
||||
* For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
|
||||
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
|
||||
*/
|
||||
readonly fileMatch?: string[];
|
||||
/**
|
||||
* The schema for the given URI.
|
||||
*/
|
||||
readonly schema?: any;
|
||||
}[];
|
||||
/**
|
||||
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
||||
*/
|
||||
readonly enableSchemaRequest?: boolean;
|
||||
/**
|
||||
* The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaValidation?: SeverityLevel;
|
||||
/**
|
||||
* The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaRequest?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
|
||||
*/
|
||||
readonly trailingCommas?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
|
||||
*/
|
||||
readonly comments?: SeverityLevel;
|
||||
}
|
||||
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in tokens provider is enabled.
|
||||
*/
|
||||
readonly tokens?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const jsonDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
readonly insertSpaces: boolean;
|
||||
readonly wrapLineLength: number;
|
||||
readonly unformatted: string;
|
||||
readonly contentUnformatted: string;
|
||||
readonly indentInnerHtml: boolean;
|
||||
readonly preserveNewLines: boolean;
|
||||
readonly maxPreserveNewLines: number | undefined;
|
||||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
}
|
||||
export interface CompletionConfiguration {
|
||||
readonly [providerId: string]: boolean;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
*/
|
||||
readonly format?: HTMLFormatConfiguration;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
/**
|
||||
* Configures the HTML data types known by the HTML langauge service.
|
||||
*/
|
||||
readonly data?: HTMLDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const htmlLanguageService: LanguageServiceRegistration;
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorLanguageService: LanguageServiceRegistration;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
export interface LanguageServiceRegistration extends IDisposable {
|
||||
readonly defaults: LanguageServiceDefaults;
|
||||
}
|
||||
/**
|
||||
* Registers a new HTML language service for the languageId.
|
||||
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
||||
*
|
||||
* Use this method to register additional language ids with a HTML service.
|
||||
* The language server has to be registered before an editor model is opened.
|
||||
*/
|
||||
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
||||
export interface HTMLDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard HTML tags and attributes are shown
|
||||
*/
|
||||
readonly useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
readonly dataProviders?: {
|
||||
[providerId: string]: HTMLDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom HTML tags attributes and attribute values
|
||||
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface HTMLDataV1 {
|
||||
readonly version: 1 | 1.1;
|
||||
readonly tags?: ITagData[];
|
||||
readonly globalAttributes?: IAttributeData[];
|
||||
readonly valueSets?: IValueSet[];
|
||||
}
|
||||
export interface IReference {
|
||||
readonly name: string;
|
||||
readonly url: string;
|
||||
}
|
||||
export interface ITagData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly attributes: IAttributeData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IAttributeData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly valueSet?: string;
|
||||
readonly values?: IValueData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueSet {
|
||||
readonly name: string;
|
||||
readonly values: IValueData[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
readonly kind: MarkupKind;
|
||||
readonly value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
|
|
|||
898
website/typedoc/monaco.d.ts
vendored
898
website/typedoc/monaco.d.ts
vendored
|
|
@ -7128,6 +7128,455 @@ declare namespace monaco.worker {
|
|||
|
||||
//dtsv=3
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: {
|
||||
[providerId: string]: CSSDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
readonly insertSpaces: boolean;
|
||||
readonly wrapLineLength: number;
|
||||
readonly unformatted: string;
|
||||
readonly contentUnformatted: string;
|
||||
readonly indentInnerHtml: boolean;
|
||||
readonly preserveNewLines: boolean;
|
||||
readonly maxPreserveNewLines: number | undefined;
|
||||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
}
|
||||
export interface CompletionConfiguration {
|
||||
readonly [providerId: string]: boolean;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
*/
|
||||
readonly format?: HTMLFormatConfiguration;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
/**
|
||||
* Configures the HTML data types known by the HTML langauge service.
|
||||
*/
|
||||
readonly data?: HTMLDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const htmlLanguageService: LanguageServiceRegistration;
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorLanguageService: LanguageServiceRegistration;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
export interface LanguageServiceRegistration extends IDisposable {
|
||||
readonly defaults: LanguageServiceDefaults;
|
||||
}
|
||||
/**
|
||||
* Registers a new HTML language service for the languageId.
|
||||
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
||||
*
|
||||
* Use this method to register additional language ids with a HTML service.
|
||||
* The language server has to be registered before an editor model is opened.
|
||||
*/
|
||||
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
||||
export interface HTMLDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard HTML tags and attributes are shown
|
||||
*/
|
||||
readonly useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
readonly dataProviders?: {
|
||||
[providerId: string]: HTMLDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom HTML tags attributes and attribute values
|
||||
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface HTMLDataV1 {
|
||||
readonly version: 1 | 1.1;
|
||||
readonly tags?: ITagData[];
|
||||
readonly globalAttributes?: IAttributeData[];
|
||||
readonly valueSets?: IValueSet[];
|
||||
}
|
||||
export interface IReference {
|
||||
readonly name: string;
|
||||
readonly url: string;
|
||||
}
|
||||
export interface ITagData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly attributes: IAttributeData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IAttributeData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly valueSet?: string;
|
||||
readonly values?: IValueData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueSet {
|
||||
readonly name: string;
|
||||
readonly values: IValueData[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
readonly kind: MarkupKind;
|
||||
readonly value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
* If set, the validator will be enabled and perform syntax and schema based validation,
|
||||
* unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
|
||||
*/
|
||||
readonly validate?: boolean;
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
* `DiagnosticsOptions.allowComments` will override this setting.
|
||||
*/
|
||||
readonly allowComments?: boolean;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly schemas?: {
|
||||
/**
|
||||
* The URI of the schema, which is also the identifier of the schema.
|
||||
*/
|
||||
readonly uri: string;
|
||||
/**
|
||||
* A list of glob patterns that describe for which file URIs the JSON schema will be used.
|
||||
* '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
|
||||
* For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
|
||||
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
|
||||
*/
|
||||
readonly fileMatch?: string[];
|
||||
/**
|
||||
* The schema for the given URI.
|
||||
*/
|
||||
readonly schema?: any;
|
||||
}[];
|
||||
/**
|
||||
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
||||
*/
|
||||
readonly enableSchemaRequest?: boolean;
|
||||
/**
|
||||
* The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaValidation?: SeverityLevel;
|
||||
/**
|
||||
* The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaRequest?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
|
||||
*/
|
||||
readonly trailingCommas?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
|
||||
*/
|
||||
readonly comments?: SeverityLevel;
|
||||
}
|
||||
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in tokens provider is enabled.
|
||||
*/
|
||||
readonly tokens?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const jsonDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -7520,452 +7969,3 @@ declare namespace monaco.languages.typescript {
|
|||
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: {
|
||||
[providerId: string]: CSSDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
* If set, the validator will be enabled and perform syntax and schema based validation,
|
||||
* unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
|
||||
*/
|
||||
readonly validate?: boolean;
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
* `DiagnosticsOptions.allowComments` will override this setting.
|
||||
*/
|
||||
readonly allowComments?: boolean;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly schemas?: {
|
||||
/**
|
||||
* The URI of the schema, which is also the identifier of the schema.
|
||||
*/
|
||||
readonly uri: string;
|
||||
/**
|
||||
* A list of glob patterns that describe for which file URIs the JSON schema will be used.
|
||||
* '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
|
||||
* For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
|
||||
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
|
||||
*/
|
||||
readonly fileMatch?: string[];
|
||||
/**
|
||||
* The schema for the given URI.
|
||||
*/
|
||||
readonly schema?: any;
|
||||
}[];
|
||||
/**
|
||||
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
||||
*/
|
||||
readonly enableSchemaRequest?: boolean;
|
||||
/**
|
||||
* The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaValidation?: SeverityLevel;
|
||||
/**
|
||||
* The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
|
||||
*/
|
||||
readonly schemaRequest?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
|
||||
*/
|
||||
readonly trailingCommas?: SeverityLevel;
|
||||
/**
|
||||
* The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
|
||||
*/
|
||||
readonly comments?: SeverityLevel;
|
||||
}
|
||||
export type SeverityLevel = 'error' | 'warning' | 'ignore';
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in tokens provider is enabled.
|
||||
*/
|
||||
readonly tokens?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const jsonDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
readonly insertSpaces: boolean;
|
||||
readonly wrapLineLength: number;
|
||||
readonly unformatted: string;
|
||||
readonly contentUnformatted: string;
|
||||
readonly indentInnerHtml: boolean;
|
||||
readonly preserveNewLines: boolean;
|
||||
readonly maxPreserveNewLines: number | undefined;
|
||||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
}
|
||||
export interface CompletionConfiguration {
|
||||
readonly [providerId: string]: boolean;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
*/
|
||||
readonly format?: HTMLFormatConfiguration;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
/**
|
||||
* Configures the HTML data types known by the HTML langauge service.
|
||||
*/
|
||||
readonly data?: HTMLDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
export const htmlLanguageService: LanguageServiceRegistration;
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorLanguageService: LanguageServiceRegistration;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
export interface LanguageServiceRegistration extends IDisposable {
|
||||
readonly defaults: LanguageServiceDefaults;
|
||||
}
|
||||
/**
|
||||
* Registers a new HTML language service for the languageId.
|
||||
* Note: 'html', 'handlebar' and 'razor' are registered by default.
|
||||
*
|
||||
* Use this method to register additional language ids with a HTML service.
|
||||
* The language server has to be registered before an editor model is opened.
|
||||
*/
|
||||
export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
|
||||
export interface HTMLDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard HTML tags and attributes are shown
|
||||
*/
|
||||
readonly useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
readonly dataProviders?: {
|
||||
[providerId: string]: HTMLDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom HTML tags attributes and attribute values
|
||||
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface HTMLDataV1 {
|
||||
readonly version: 1 | 1.1;
|
||||
readonly tags?: ITagData[];
|
||||
readonly globalAttributes?: IAttributeData[];
|
||||
readonly valueSets?: IValueSet[];
|
||||
}
|
||||
export interface IReference {
|
||||
readonly name: string;
|
||||
readonly url: string;
|
||||
}
|
||||
export interface ITagData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly attributes: IAttributeData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IAttributeData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly valueSet?: string;
|
||||
readonly values?: IValueData[];
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
readonly name: string;
|
||||
readonly description?: string | MarkupContent;
|
||||
readonly references?: IReference[];
|
||||
}
|
||||
export interface IValueSet {
|
||||
readonly name: string;
|
||||
readonly values: IValueData[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
readonly kind: MarkupKind;
|
||||
readonly value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue