mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +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(
|
dts(
|
||||||
`out/amd/language/css/monaco.contribution.d.ts`,
|
`out/amd/language/css/monaco.contribution.d.ts`,
|
||||||
`out/release/language/css/monaco.d.ts`,
|
`out/release/css.d.ts`,
|
||||||
'monaco.languages.css'
|
'monaco.languages.css'
|
||||||
);
|
);
|
||||||
dts(
|
dts(
|
||||||
`out/amd/language/html/monaco.contribution.d.ts`,
|
`out/amd/language/html/monaco.contribution.d.ts`,
|
||||||
`out/release/language/html/monaco.d.ts`,
|
`out/release/html.d.ts`,
|
||||||
'monaco.languages.html'
|
'monaco.languages.html'
|
||||||
);
|
);
|
||||||
dts(
|
dts(
|
||||||
`out/amd/language/json/monaco.contribution.d.ts`,
|
`out/amd/language/json/monaco.contribution.d.ts`,
|
||||||
`out/release/language/json/monaco.d.ts`,
|
`out/release/json.d.ts`,
|
||||||
'monaco.languages.json'
|
'monaco.languages.json'
|
||||||
);
|
);
|
||||||
dts(
|
dts(
|
||||||
`out/amd/language/typescript/monaco.contribution.d.ts`,
|
`out/amd/language/typescript/monaco.contribution.d.ts`,
|
||||||
`out/release/language/typescript/monaco.d.ts`,
|
`out/release/typescript.d.ts`,
|
||||||
'monaco.languages.typescript'
|
'monaco.languages.typescript'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
108
build/release.js
108
build/release.js
|
|
@ -5,12 +5,6 @@
|
||||||
|
|
||||||
//@ts-check
|
//@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 */
|
/** @typedef {import('../build/utils').IFile} IFile */
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
@ -18,8 +12,6 @@ const fs = require('fs');
|
||||||
const { REPO_ROOT, readFiles, writeFiles } = require('../build/utils');
|
const { REPO_ROOT, readFiles, writeFiles } = require('../build/utils');
|
||||||
const { removeDir } = require('../build/fs');
|
const { removeDir } = require('../build/fs');
|
||||||
const ts = require('typescript');
|
const ts = require('typescript');
|
||||||
/**@type { IMetadata } */
|
|
||||||
const metadata = require('../metadata.js');
|
|
||||||
const { generateMetadata } = require('./releaseMetadata');
|
const { generateMetadata } = require('./releaseMetadata');
|
||||||
|
|
||||||
removeDir(`release`);
|
removeDir(`release`);
|
||||||
|
|
@ -85,24 +77,11 @@ function AMD_releaseOne(type) {
|
||||||
AMD_addPluginContribs(type, coreFiles);
|
AMD_addPluginContribs(type, coreFiles);
|
||||||
writeFiles(coreFiles, `release/${type}`);
|
writeFiles(coreFiles, `release/${type}`);
|
||||||
|
|
||||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
const pluginFiles = readFiles(`out/release/${type}/**/*`, {
|
||||||
AMD_releasePlugin(plugin, type, `release/${type}`);
|
base: `out/release/${type}`,
|
||||||
}
|
ignore: ['**/monaco.contribution.js']
|
||||||
}
|
});
|
||||||
|
writeFiles(pluginFiles, `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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -125,25 +104,21 @@ function AMD_addPluginContribs(type, files) {
|
||||||
// Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
|
// Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
|
||||||
contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"');
|
contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"');
|
||||||
|
|
||||||
/** @type {string[]} */
|
const pluginFiles = readFiles(`out/release/${type}/**/monaco.contribution.js`, {
|
||||||
let extraContent = [];
|
base: `out/release/${type}`
|
||||||
/** @type {string[]} */
|
});
|
||||||
let allPluginsModuleIds = [];
|
|
||||||
|
|
||||||
metadata.METADATA.PLUGINS.forEach(function (plugin) {
|
const extraContent = pluginFiles.map((file) => {
|
||||||
allPluginsModuleIds.push(plugin.contrib);
|
return file.contents
|
||||||
const pluginPath = path.join(plugin.rootPath, plugin.paths[type]); // dev or min
|
.toString()
|
||||||
const contribPath =
|
.replace(
|
||||||
path.join(REPO_ROOT, pluginPath, plugin.contrib.substring(plugin.modulePrefix.length)) +
|
|
||||||
'.js';
|
|
||||||
let contribContents = fs.readFileSync(contribPath).toString();
|
|
||||||
|
|
||||||
contribContents = contribContents.replace(
|
|
||||||
/define\((['"][a-z\/\-]+\/fillers\/monaco-editor-core['"]),\[\],/,
|
/define\((['"][a-z\/\-]+\/fillers\/monaco-editor-core['"]),\[\],/,
|
||||||
"define($1,['vs/editor/editor.api'],"
|
"define($1,['vs/editor/editor.api'],"
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
extraContent.push(contribContents);
|
const allPluginsModuleIds = pluginFiles.map((file) => {
|
||||||
|
return file.path.replace(/\.js$/, '');
|
||||||
});
|
});
|
||||||
|
|
||||||
extraContent.push(
|
extraContent.push(
|
||||||
|
|
@ -176,22 +151,16 @@ function ESM_release() {
|
||||||
ESM_addPluginContribs(coreFiles);
|
ESM_addPluginContribs(coreFiles);
|
||||||
writeFiles(coreFiles, `release/esm`);
|
writeFiles(coreFiles, `release/esm`);
|
||||||
|
|
||||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
ESM_releasePlugins();
|
||||||
ESM_releasePlugin(plugin, `release/esm`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release a plugin to `esm`.
|
* Release a plugin to `esm`.
|
||||||
* Adds a dependency to 'vs/editor/editor.api' in contrib files in order for `monaco` to be defined.
|
* Adds a dependency to 'vs/editor/editor.api' in contrib files in order for `monaco` to be defined.
|
||||||
* Rewrites imports for 'monaco-editor-core/**'
|
* Rewrites imports for 'monaco-editor-core/**'
|
||||||
* @param {IPlugin} plugin
|
|
||||||
* @param {string} destinationPath
|
|
||||||
*/
|
*/
|
||||||
function ESM_releasePlugin(plugin, destinationPath) {
|
function ESM_releasePlugins() {
|
||||||
const pluginPath = path.join(plugin.rootPath, plugin.paths['esm']);
|
const files = readFiles(`out/release/esm/**/*`, { base: 'out/release/esm/' });
|
||||||
|
|
||||||
const files = readFiles(`${pluginPath}/**/*`, { base: pluginPath });
|
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
if (!/(\.js$)|(\.ts$)/.test(file.path)) {
|
if (!/(\.js$)|(\.ts$)/.test(file.path)) {
|
||||||
|
|
@ -217,10 +186,9 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
||||||
importText = 'monaco-editor-core/esm/vs/editor/editor.api';
|
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);
|
const importFilePath = importText.substring('monaco-editor-core/esm/'.length);
|
||||||
let relativePath = path
|
let relativePath = path
|
||||||
.relative(path.dirname(myFileDestPath), importFilePath)
|
.relative(path.dirname(file.path), importFilePath)
|
||||||
.replace(/\\/g, '/');
|
.replace(/\\/g, '/');
|
||||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||||
relativePath = './' + relativePath;
|
relativePath = './' + relativePath;
|
||||||
|
|
@ -238,9 +206,8 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const myFileDestPath = path.join(plugin.modulePrefix, file.path);
|
|
||||||
const apiFilePath = 'vs/editor/editor.api';
|
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)) {
|
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||||
relativePath = './' + relativePath;
|
relativePath = './' + relativePath;
|
||||||
}
|
}
|
||||||
|
|
@ -251,7 +218,7 @@ function ESM_releasePlugin(plugin, destinationPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ESM_addImportSuffix(files);
|
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';
|
const mainFileDestPath = 'vs/editor/editor.main.js';
|
||||||
|
|
||||||
/** @type {string[]} */
|
const mainFileImports = readFiles(`out/release/esm/**/monaco.contribution.js`, {
|
||||||
let mainFileImports = [];
|
base: `out/release/esm`
|
||||||
for (const plugin of metadata.METADATA.PLUGINS) {
|
}).map((file) => {
|
||||||
const contribDestPath = plugin.contrib;
|
|
||||||
|
|
||||||
let relativePath = path
|
let relativePath = path
|
||||||
.relative(path.dirname(mainFileDestPath), contribDestPath)
|
.relative(path.dirname(mainFileDestPath), file.path)
|
||||||
.replace(/\\/g, '/');
|
.replace(/\\/g, '/')
|
||||||
|
.replace(/\.js$/, '');
|
||||||
|
|
||||||
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
if (!/(^\.\/)|(^\.\.\/)/.test(relativePath)) {
|
||||||
relativePath = './' + relativePath;
|
relativePath = './' + relativePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
mainFileImports.push(relativePath);
|
return relativePath;
|
||||||
}
|
});
|
||||||
|
|
||||||
const mainFileContents =
|
const mainFileContents =
|
||||||
mainFileImports.map((name) => `import '${name}';`).join('\n') +
|
mainFileImports.map((name) => `import '${name}';`).join('\n') +
|
||||||
|
|
@ -335,17 +302,10 @@ function releaseDTS() {
|
||||||
|
|
||||||
let contents = monacodts.contents.toString();
|
let contents = monacodts.contents.toString();
|
||||||
|
|
||||||
/** @type {string[]} */
|
const extraContent = readFiles('out/release/*.d.ts', {
|
||||||
const extraContent = [];
|
base: 'out/release/'
|
||||||
metadata.METADATA.PLUGINS.forEach(function (plugin) {
|
}).map((file) => {
|
||||||
const dtsPath = path.join(plugin.rootPath, './monaco.d.ts');
|
return file.contents.toString().replace(/\/\/\/ <reference.*\n/m, '');
|
||||||
try {
|
|
||||||
let plugindts = fs.readFileSync(dtsPath).toString();
|
|
||||||
plugindts = plugindts.replace(/\/\/\/ <reference.*\n/m, '');
|
|
||||||
extraContent.push(plugindts);
|
|
||||||
} catch (err) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
contents =
|
contents =
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ function buildESM(options) {
|
||||||
},
|
},
|
||||||
external: options.external,
|
external: options.external,
|
||||||
outbase: `src/${options.base}`,
|
outbase: `src/${options.base}`,
|
||||||
outdir: `out/release/${options.base}/esm/`,
|
outdir: `out/release/esm/vs/${options.base}/`,
|
||||||
plugins: [
|
plugins: [
|
||||||
alias({
|
alias({
|
||||||
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
|
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
|
||||||
|
|
@ -183,7 +183,7 @@ function buildOneAMD(type, options) {
|
||||||
js: 'return moduleExports;\n});'
|
js: 'return moduleExports;\n});'
|
||||||
},
|
},
|
||||||
outbase: `src/${options.base}`,
|
outbase: `src/${options.base}`,
|
||||||
outdir: `out/release/${options.base}/${type}/`,
|
outdir: `out/release/${type}/vs/${options.base}/`,
|
||||||
plugins: [
|
plugins: [
|
||||||
alias({
|
alias({
|
||||||
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
||||||
|
|
|
||||||
50
metadata.js
50
metadata.js
|
|
@ -15,65 +15,65 @@
|
||||||
name: 'monaco-typescript',
|
name: 'monaco-typescript',
|
||||||
contrib: 'vs/language/typescript/monaco.contribution',
|
contrib: 'vs/language/typescript/monaco.contribution',
|
||||||
modulePrefix: 'vs/language/typescript',
|
modulePrefix: 'vs/language/typescript',
|
||||||
rootPath: './out/release/language/typescript',
|
rootPath: './out/release',
|
||||||
paths: {
|
paths: {
|
||||||
// use ./ to indicate it is relative to the `rootPath`
|
// use ./ to indicate it is relative to the `rootPath`
|
||||||
src: './../../../amd/language/typescript',
|
src: './../amd/language/typescript',
|
||||||
dev: './dev',
|
dev: './dev/vs/language/typescript',
|
||||||
min: './min',
|
min: './min/vs/language/typescript',
|
||||||
esm: './esm'
|
esm: './esm/vs/language/typescript'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'monaco-css',
|
name: 'monaco-css',
|
||||||
contrib: 'vs/language/css/monaco.contribution',
|
contrib: 'vs/language/css/monaco.contribution',
|
||||||
modulePrefix: 'vs/language/css',
|
modulePrefix: 'vs/language/css',
|
||||||
rootPath: './out/release/language/css',
|
rootPath: './out/release',
|
||||||
paths: {
|
paths: {
|
||||||
// use ./ to indicate it is relative to the `rootPath`
|
// use ./ to indicate it is relative to the `rootPath`
|
||||||
src: './../../../amd/language/css',
|
src: './../amd/language/css',
|
||||||
dev: './dev',
|
dev: './dev/vs/language/css',
|
||||||
min: './min',
|
min: './min/vs/language/css',
|
||||||
esm: './esm'
|
esm: './esm/vs/language/css'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'monaco-json',
|
name: 'monaco-json',
|
||||||
contrib: 'vs/language/json/monaco.contribution',
|
contrib: 'vs/language/json/monaco.contribution',
|
||||||
modulePrefix: 'vs/language/json',
|
modulePrefix: 'vs/language/json',
|
||||||
rootPath: './out/release/language/json',
|
rootPath: './out/release',
|
||||||
paths: {
|
paths: {
|
||||||
// use ./ to indicate it is relative to the `rootPath`
|
// use ./ to indicate it is relative to the `rootPath`
|
||||||
src: './../../../amd/language/json',
|
src: './../amd/language/json',
|
||||||
dev: './dev',
|
dev: './dev/vs/language/json',
|
||||||
min: './min',
|
min: './min/vs/language/json',
|
||||||
esm: './esm'
|
esm: './esm/vs/language/json'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'monaco-html',
|
name: 'monaco-html',
|
||||||
contrib: 'vs/language/html/monaco.contribution',
|
contrib: 'vs/language/html/monaco.contribution',
|
||||||
modulePrefix: 'vs/language/html',
|
modulePrefix: 'vs/language/html',
|
||||||
rootPath: './out/release/language/html',
|
rootPath: './out/release',
|
||||||
paths: {
|
paths: {
|
||||||
// use ./ to indicate it is relative to the `rootPath`
|
// use ./ to indicate it is relative to the `rootPath`
|
||||||
src: './../../../amd/language/html',
|
src: './../amd/language/html',
|
||||||
dev: './dev',
|
dev: './dev/vs/language/html',
|
||||||
min: './min',
|
min: './min/vs/language/html',
|
||||||
esm: './esm'
|
esm: './esm/vs/language/html'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'monaco-languages',
|
name: 'monaco-languages',
|
||||||
contrib: 'vs/basic-languages/monaco.contribution',
|
contrib: 'vs/basic-languages/monaco.contribution',
|
||||||
modulePrefix: 'vs/basic-languages',
|
modulePrefix: 'vs/basic-languages',
|
||||||
rootPath: './out/release/basic-languages',
|
rootPath: './out/release',
|
||||||
paths: {
|
paths: {
|
||||||
// use ./ to indicate it is relative to the `rootPath`
|
// use ./ to indicate it is relative to the `rootPath`
|
||||||
src: './../../amd/basic-languages',
|
src: './../amd/basic-languages',
|
||||||
dev: './dev',
|
dev: './dev/vs/basic-languages',
|
||||||
min: './min',
|
min: './min/vs/basic-languages',
|
||||||
esm: './esm'
|
esm: './esm/vs/basic-languages'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -7128,6 +7128,455 @@ declare namespace monaco.worker {
|
||||||
|
|
||||||
//dtsv=3
|
//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.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* 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 getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||||
export const getJavaScriptWorker: () => 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
|
//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.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* 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 getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||||
export const getJavaScriptWorker: () => 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