Merge pull request #2766 from microsoft/alex/merge-src-folders

Merge src folders
This commit is contained in:
Alexandru Dima 2021-11-13 20:44:14 +01:00 committed by GitHub
commit 136ce723f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
312 changed files with 452 additions and 1858 deletions

View file

@ -17,7 +17,7 @@ jobs:
id: cacheNodeModules id: cacheNodeModules
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: "**/node_modules" path: '**/node_modules'
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-cacheNodeModules- restore-keys: ${{ runner.os }}-cacheNodeModules-

View file

@ -1,5 +1,4 @@
/monaco-css/out/ /out/
/monaco-css/release/
/monaco-editor-samples/browser-esm-parcel/.cache/ /monaco-editor-samples/browser-esm-parcel/.cache/
/monaco-editor-samples/browser-esm-parcel/dist/ /monaco-editor-samples/browser-esm-parcel/dist/
/monaco-editor-samples/browser-esm-webpack/dist/*.js /monaco-editor-samples/browser-esm-webpack/dist/*.js
@ -12,14 +11,6 @@
/monaco-editor/typedoc/theme/ /monaco-editor/typedoc/theme/
/monaco-editor/typedoc/monaco.d.ts /monaco-editor/typedoc/monaco.d.ts
/monaco-editor/website/lib/ /monaco-editor/website/lib/
/monaco-html/out/
/monaco-html/release/
/monaco-editor-webpack-plugin/test/dist/*.js /monaco-editor-webpack-plugin/test/dist/*.js
/monaco-json/out/
/monaco-json/release/
/monaco-languages/out/
/monaco-languages/release/
/monaco-typescript/out/
/monaco-typescript/release/
/monaco-typescript/src/lib/
/release/ /release/
/src/typescript/lib/

8
.vscode/launch.json vendored
View file

@ -8,13 +8,9 @@
"type": "pwa-node", "type": "pwa-node",
"request": "launch", "request": "launch",
"name": "Monaco Languages Unit Tests", "name": "Monaco Languages Unit Tests",
"skipFiles": [ "skipFiles": ["<node_internals>/**"],
"<node_internals>/**"
],
"program": "${workspaceFolder}\\monaco-languages\\test\\all.js", "program": "${workspaceFolder}\\monaco-languages\\test\\all.js",
"outFiles": [ "outFiles": ["${workspaceFolder}/**/*.js"]
"${workspaceFolder}/**/*.js"
]
} }
] ]
} }

View file

@ -11,10 +11,10 @@ This repository contains source code only for Monaco Editor Languages, the core
## Contributing a new tokenizer / a new language ## Contributing a new tokenizer / a new language
- create `$/monaco-languages/src/myLang/myLang.contribution.ts` - create `$/src/basic-languages/myLang/myLang.contribution.ts`
- create `$/monaco-languages/src/myLang/myLang.ts` - create `$/src/basic-languages/myLang/myLang.ts`
- create `$/monaco-languages/src/myLang/myLang.test.ts` - create `$/src/basic-languages/myLang/myLang.test.ts`
- edit `$/monaco-languages/src/monaco.contribution.ts` and register your new language - edit `$/src/basic-languages/monaco.contribution.ts` and register your new language
```js ```js
import './myLang/myLang.contribution'; import './myLang/myLang.contribution';

203
build/build.js Normal file
View file

@ -0,0 +1,203 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const glob = require('glob');
const { copyFile, removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
removeDir(`out`);
tsc(`src/tsconfig.json`);
//#region Type Defintion
dts(`out/amd/css/monaco.contribution.d.ts`, `out/release/css/monaco.d.ts`, 'monaco.languages.css');
dts(
`out/amd/html/monaco.contribution.d.ts`,
`out/release/html/monaco.d.ts`,
'monaco.languages.html'
);
dts(
`out/amd/json/monaco.contribution.d.ts`,
`out/release/json/monaco.d.ts`,
'monaco.languages.json'
);
dts(
`out/amd/typescript/monaco.contribution.d.ts`,
`out/release/typescript/monaco.d.ts`,
'monaco.languages.typescript'
);
//#endregion
//#region css
buildESM({
base: 'css',
entryPoints: ['src/css/monaco.contribution.ts', 'src/css/cssMode.ts', 'src/css/css.worker.ts'],
external: ['monaco-editor-core', '*/cssMode']
});
buildAMD({
base: 'css',
entryPoint: 'src/css/monaco.contribution.ts',
amdModuleId: 'vs/language/css/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'css',
entryPoint: 'src/css/cssMode.ts',
amdModuleId: 'vs/language/css/cssMode'
});
buildAMD({
base: 'css',
entryPoint: 'src/css/cssWorker.ts',
amdModuleId: 'vs/language/css/cssWorker'
});
//#endregion
//#region html
buildESM({
base: 'html',
entryPoints: [
'src/html/monaco.contribution.ts',
'src/html/htmlMode.ts',
'src/html/html.worker.ts'
],
external: ['monaco-editor-core', '*/htmlMode']
});
buildAMD({
base: 'html',
entryPoint: 'src/html/monaco.contribution.ts',
amdModuleId: 'vs/language/html/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'html',
entryPoint: 'src/html/htmlMode.ts',
amdModuleId: 'vs/language/html/htmlMode'
});
buildAMD({
base: 'html',
entryPoint: 'src/html/htmlWorker.ts',
amdModuleId: 'vs/language/html/htmlWorker'
});
//#endregion
//#region json
buildESM({
base: 'json',
entryPoints: [
'src/json/monaco.contribution.ts',
'src/json/jsonMode.ts',
'src/json/json.worker.ts'
],
external: ['monaco-editor-core', '*/jsonMode']
});
buildAMD({
base: 'json',
entryPoint: 'src/json/monaco.contribution.ts',
amdModuleId: 'vs/language/json/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'json',
entryPoint: 'src/json/jsonMode.ts',
amdModuleId: 'vs/language/json/jsonMode'
});
buildAMD({
base: 'json',
entryPoint: 'src/json/jsonWorker.ts',
amdModuleId: 'vs/language/json/jsonWorker'
});
//#endregion
//#region typescript
copyFile(
`src/typescript/lib/typescriptServices-amd.js`,
`out/amd/typescript/lib/typescriptServices.js`
);
buildESM({
base: 'typescript',
entryPoints: [
'src/typescript/monaco.contribution.ts',
'src/typescript/tsMode.ts',
'src/typescript/ts.worker.ts'
],
external: ['monaco-editor-core', '*/tsMode']
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/monaco.contribution.ts',
amdModuleId: 'vs/language/typescript/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/tsMode.ts',
amdModuleId: 'vs/language/typescript/tsMode'
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/tsWorker.ts',
amdModuleId: 'vs/language/typescript/tsWorker'
});
//#endregion
//#region basic-languages
glob('../src/basic-languages/*/*.contribution.ts', { cwd: __dirname }, function (err, files) {
if (err) {
console.error(err);
return;
}
const languages = files.map((file) => file.split('/')[3]);
// ESM
{
/** @type {string[]} */
const entryPoints = ['src/basic-languages/monaco.contribution.ts', 'src/basic-languages/_.contribution.ts'];
const external = ['monaco-editor-core', '*/_.contribution'];
for (const language of languages) {
entryPoints.push(`src/basic-languages/${language}/${language}.contribution.ts`);
entryPoints.push(`src/basic-languages/${language}/${language}.ts`);
external.push(`*/${language}.contribution`);
external.push(`*/${language}`);
}
buildESM({
base: 'basic-languages',
entryPoints,
external
});
}
// AMD
{
buildAMD({
base: 'basic-languages',
entryPoint: 'src/basic-languages/monaco.contribution.ts',
amdModuleId: 'vs/basic-languages/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
for (const language of languages) {
buildAMD({
base: 'basic-languages',
entryPoint: `src/basic-languages/${language}/${language}.ts`,
amdModuleId: `vs/basic-languages/${language}/${language}`
});
}
}
});
//#endregion

View file

@ -14,7 +14,7 @@ const generatedNote = `//
const REPO_ROOT = path.join(__dirname, '../'); const REPO_ROOT = path.join(__dirname, '../');
const TYPESCRIPT_LIB_SOURCE = path.join(REPO_ROOT, 'node_modules/typescript/lib'); const TYPESCRIPT_LIB_SOURCE = path.join(REPO_ROOT, 'node_modules/typescript/lib');
const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'monaco-typescript/src/lib'); const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'src/typescript/lib');
(function () { (function () {
try { try {
@ -111,12 +111,12 @@ define("vs/language/typescript/lib/typescriptServices", [], function() { return
// Remove pattern that creates warnings with esbuild // Remove pattern that creates warnings with esbuild
// e.g. // e.g.
// > monaco-typescript/src/lib/typescriptServices.js:20:21: warning: Top-level "this" will be replaced with undefined since this file is an ECMAScript module // > /src/typescript/lib/typescriptServices.js:20:21: warning: Top-level "this" will be replaced with undefined since this file is an ECMAScript module
// 20 │ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { // 20 │ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
// ╵ ~~~~ // ╵ ~~~~
// //
tsServices = tsServices.replace(/\nvar ([^ ]+) = \(this && this\.([^)]+)\) \|\|/gm, '\nvar $1 =') tsServices = tsServices.replace(/\nvar ([^ ]+) = \(this && this\.([^)]+)\) \|\|/gm, '\nvar $1 =');
const tsServices_esm = const tsServices_esm =
generatedNote + generatedNote +

View file

@ -13,6 +13,25 @@ const alias = require('esbuild-plugin-alias');
const REPO_ROOT = path.join(__dirname, '..'); const REPO_ROOT = path.join(__dirname, '..');
/**
* @param {string} dirname
*/
function ensureDir(dirname) {
/** @type {string[]} */
const dirs = [];
while (dirname.length > REPO_ROOT.length) {
dirs.push(dirname);
dirname = path.dirname(dirname);
}
dirs.reverse();
dirs.forEach(function (dir) {
try {
fs.mkdirSync(dir);
} catch (err) {}
});
}
/** /**
* Copy a file. * Copy a file.
* *
@ -23,24 +42,7 @@ function copyFile(_source, _destination) {
const source = path.join(REPO_ROOT, _source); const source = path.join(REPO_ROOT, _source);
const destination = path.join(REPO_ROOT, _destination); const destination = path.join(REPO_ROOT, _destination);
// ensure target dir ensureDir(path.dirname(destination));
(function () {
/** @type {string[]} */
const dirs = [];
/** @type {string} */
let dirname = path.dirname(destination);
while (dirname.length > REPO_ROOT.length) {
dirs.push(dirname);
dirname = path.dirname(dirname);
}
dirs.reverse();
dirs.forEach(function (dir) {
try {
fs.mkdirSync(dir);
} catch (err) {}
});
})();
fs.writeFileSync(destination, fs.readFileSync(source)); fs.writeFileSync(destination, fs.readFileSync(source));
console.log(`Copied ${_source} to ${_destination}`); console.log(`Copied ${_source} to ${_destination}`);
@ -134,8 +136,6 @@ function dts(_source, _destination, namespace) {
` * 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.`,
` *--------------------------------------------------------------------------------------------*/`, ` *--------------------------------------------------------------------------------------------*/`,
``, ``,
`/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />`,
``,
`declare namespace ${namespace} {` `declare namespace ${namespace} {`
]; ];
for (let line of lines) { for (let line of lines) {
@ -155,6 +155,7 @@ function dts(_source, _destination, namespace) {
result.push(`}`); result.push(`}`);
result.push(``); result.push(``);
ensureDir(path.dirname(destination));
fs.writeFileSync(destination, result.join('\n')); fs.writeFileSync(destination, result.join('\n'));
prettier(_destination); prettier(_destination);
@ -185,7 +186,7 @@ exports.build = build;
*/ */
function buildESM(options) { function buildESM(options) {
build({ build({
entryPoints: options.entryPoints.map(e => (`${options.base}/${e}`)), entryPoints: options.entryPoints,
bundle: true, bundle: true,
target: 'esnext', target: 'esnext',
format: 'esm', format: 'esm',
@ -196,8 +197,8 @@ function buildESM(options) {
js: bundledFileHeader js: bundledFileHeader
}, },
external: options.external, external: options.external,
outbase: `${options.base}/src`, outbase: `src/${options.base}`,
outdir: `${options.base}/release/esm/`, outdir: `out/release/${options.base}/esm/`,
plugins: [ plugins: [
alias({ alias({
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts') 'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
@ -219,7 +220,7 @@ exports.buildESM = buildESM;
function buildOneAMD(type, options) { function buildOneAMD(type, options) {
/** @type {import('esbuild').BuildOptions} */ /** @type {import('esbuild').BuildOptions} */
const opts = { const opts = {
entryPoints: [`${options.base}/${options.entryPoint}`], entryPoints: [options.entryPoint],
bundle: true, bundle: true,
target: 'esnext', target: 'esnext',
format: 'iife', format: 'iife',
@ -228,13 +229,15 @@ function buildOneAMD(type, options) {
}, },
globalName: 'moduleExports', globalName: 'moduleExports',
banner: { banner: {
js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []).map(dep => (`"${dep}"`)).join(',')}],()=>{` js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || [])
.map((dep) => `"${dep}"`)
.join(',')}],()=>{`
}, },
footer: { footer: {
js: 'return moduleExports;\n});' js: 'return moduleExports;\n});'
}, },
outbase: `${options.base}/src`, outbase: `src/${options.base}`,
outdir: `${options.base}/release/${type}/`, outdir: `out/release/${options.base}/${type}/`,
plugins: [ plugins: [
alias({ alias({
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'), 'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),

13
editor.code-workspace Normal file
View file

@ -0,0 +1,13 @@
{
"folders": [
{
"path": "../vscode"
},
{
"path": "../vscode-loc"
},
{
"path": "."
}
]
}

View file

@ -1,41 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const { removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
removeDir(`monaco-css/release`);
removeDir(`monaco-css/out`);
tsc(`monaco-css/src/tsconfig.json`);
dts(
`monaco-css/out/amd/monaco.contribution.d.ts`,
`monaco-css/monaco.d.ts`,
'monaco.languages.css'
);
buildESM({
base: 'monaco-css',
entryPoints: ['src/monaco.contribution.ts', 'src/cssMode.ts', 'src/css.worker.ts'],
external: ['monaco-editor-core', '*/cssMode']
});
buildAMD({
base: 'monaco-css',
entryPoint: 'src/monaco.contribution.ts',
amdModuleId: 'vs/language/css/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'monaco-css',
entryPoint: 'src/cssMode.ts',
amdModuleId: 'vs/language/css/cssMode'
});
buildAMD({
base: 'monaco-css',
entryPoint: 'src/cssWorker.ts',
amdModuleId: 'vs/language/css/cssWorker'
});

171
monaco-css/monaco.d.ts vendored
View file

@ -1,171 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />
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';
}

View file

@ -15,60 +15,60 @@
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: './monaco-typescript', rootPath: './out/release/typescript',
paths: { paths: {
// use ./ to indicate it is relative to the `rootPath` // use ./ to indicate it is relative to the `rootPath`
dev: './release/dev', dev: './dev',
min: './release/min', min: './min',
esm: './release/esm' esm: './esm'
} }
}, },
{ {
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: './monaco-css', rootPath: './out/release/css',
paths: { paths: {
// use ./ to indicate it is relative to the `rootPath` // use ./ to indicate it is relative to the `rootPath`
dev: './release/dev', dev: './dev',
min: './release/min', min: './min',
esm: './release/esm' esm: './esm'
} }
}, },
{ {
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: './monaco-json', rootPath: './out/release/json',
paths: { paths: {
// use ./ to indicate it is relative to the `rootPath` // use ./ to indicate it is relative to the `rootPath`
dev: './release/dev', dev: './dev',
min: './release/min', min: './min',
esm: './release/esm' esm: './esm'
} }
}, },
{ {
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: './monaco-html', rootPath: './out/release/html',
paths: { paths: {
// use ./ to indicate it is relative to the `rootPath` // use ./ to indicate it is relative to the `rootPath`
dev: './release/dev', dev: './dev',
min: './release/min', min: './min',
esm: './release/esm' esm: './esm'
} }
}, },
{ {
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: './monaco-languages', rootPath: './out/release/basic-languages',
paths: { paths: {
// use ./ to indicate it is relative to the `rootPath` // use ./ to indicate it is relative to the `rootPath`
dev: './release/dev', dev: './dev',
min: './release/min', min: './min',
esm: './release/esm' esm: './esm'
} }
} }
] ]

View file

@ -1,34 +0,0 @@
{
"folders": [
{
"path": "../vscode"
},
{
"path": "../vscode-loc"
},
{
"path": "."
},
{
"path": "../monaco-css"
},
{
"path": "../monaco-html"
},
{
"path": "../monaco-json"
},
{
"path": "../monaco-languages"
},
{
"path": "../monaco-typescript"
},
{
"path": "../monaco-editor-webpack-plugin"
},
{
"path": "../monaco-editor-samples"
},
]
}

View file

@ -1,5 +1,4 @@
/// <reference path="../../node_modules/monaco-editor-core/monaco.d.ts" /> /// <reference path="../../release/monaco.d.ts" />
/// <reference path="../../monaco-typescript/monaco.d.ts" />
define(['require', './samples'], function (require, SAMPLES) { define(['require', './samples'], function (require, SAMPLES) {
var domutils = require('vs/base/browser/dom'); var domutils = require('vs/base/browser/dom');

View file

@ -6910,7 +6910,6 @@ declare namespace monaco.worker {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.typescript { declare namespace monaco.languages.typescript {
export enum ModuleKind { export enum ModuleKind {
None = 0, None = 0,
@ -6953,15 +6952,7 @@ declare namespace monaco.languages.typescript {
interface MapLike<T> { interface MapLike<T> {
[index: string]: T; [index: string]: T;
} }
type CompilerOptionsValue = type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
| string
| number
| boolean
| (string | number)[]
| string[]
| MapLike<string[]>
| null
| undefined;
interface CompilerOptions { interface CompilerOptions {
allowJs?: boolean; allowJs?: boolean;
allowSyntheticDefaultImports?: boolean; allowSyntheticDefaultImports?: boolean;
@ -7099,11 +7090,9 @@ declare namespace monaco.languages.typescript {
category: 0 | 1 | 2 | 3; category: 0 | 1 | 2 | 3;
code: number; code: number;
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */ /** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
file: file: {
| { fileName: string;
fileName: string; } | undefined;
}
| undefined;
start: number | undefined; start: number | undefined;
length: number | undefined; length: number | undefined;
messageText: string | DiagnosticMessageChain; messageText: string | DiagnosticMessageChain;
@ -7149,12 +7138,10 @@ declare namespace monaco.languages.typescript {
* files that won't be loaded as editor documents, like `jquery.d.ts`. * files that won't be loaded as editor documents, like `jquery.d.ts`.
* @param libs An array of entries to register. * @param libs An array of entries to register.
*/ */
setExtraLibs( setExtraLibs(libs: {
libs: { content: string;
content: string; filePath?: string;
filePath?: string; }[]): void;
}[]
): void;
/** /**
* Get current TypeScript compiler options for the language service. * Get current TypeScript compiler options for the language service.
*/ */
@ -7226,20 +7213,12 @@ declare namespace monaco.languages.typescript {
* Get code completion details for the given file, position, and entry. * Get code completion details for the given file, position, and entry.
* @returns `Promise<typescript.CompletionEntryDetails | undefined>` * @returns `Promise<typescript.CompletionEntryDetails | undefined>`
*/ */
getCompletionEntryDetails( getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
fileName: string,
position: number,
entry: string
): Promise<any | undefined>;
/** /**
* Get signature help items for the item at the given file and position. * Get signature help items for the item at the given file and position.
* @returns `Promise<typescript.SignatureHelpItems | undefined>` * @returns `Promise<typescript.SignatureHelpItems | undefined>`
*/ */
getSignatureHelpItems( getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>;
fileName: string,
position: number,
options: any
): Promise<any | undefined>;
/** /**
* Get quick info for the item at the given position in the file. * Get quick info for the item at the given position in the file.
* @returns `Promise<typescript.QuickInfo | undefined>` * @returns `Promise<typescript.QuickInfo | undefined>`
@ -7249,18 +7228,12 @@ declare namespace monaco.languages.typescript {
* Get other ranges which are related to the item at the given position in the file (often used for highlighting). * Get other ranges which are related to the item at the given position in the file (often used for highlighting).
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>` * @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
*/ */
getOccurrencesAtPosition( getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/** /**
* Get the definition of the item at the given position in the file. * Get the definition of the item at the given position in the file.
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>` * @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
*/ */
getDefinitionAtPosition( getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/** /**
* Get references to the item at the given position in the file. * Get references to the item at the given position in the file.
* @returns `Promise<typescript.ReferenceEntry[] | undefined>` * @returns `Promise<typescript.ReferenceEntry[] | undefined>`
@ -7282,34 +7255,18 @@ declare namespace monaco.languages.typescript {
* @param options `typescript.FormatCodeOptions` * @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>` * @returns `Promise<typescript.TextChange[]>`
*/ */
getFormattingEditsForRange( getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
fileName: string,
start: number,
end: number,
options: any
): Promise<any[]>;
/** /**
* Get formatting changes which should be applied after the given keystroke. * Get formatting changes which should be applied after the given keystroke.
* @param options `typescript.FormatCodeOptions` * @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>` * @returns `Promise<typescript.TextChange[]>`
*/ */
getFormattingEditsAfterKeystroke( getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
fileName: string,
postion: number,
ch: string,
options: any
): Promise<any[]>;
/** /**
* Get other occurrences which should be updated when renaming the item at the given file and position. * Get other occurrences which should be updated when renaming the item at the given file and position.
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>` * @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
*/ */
findRenameLocations( findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
fileName: string,
positon: number,
findInStrings: boolean,
findInComments: boolean,
providePrefixAndSuffixTextForRename: boolean
): Promise<readonly any[] | undefined>;
/** /**
* Get edits which should be applied to rename the item at the given file and position (or a failure reason). * Get edits which should be applied to rename the item at the given file and position (or a failure reason).
* @param options `typescript.RenameInfoOptions` * @param options `typescript.RenameInfoOptions`
@ -7326,13 +7283,7 @@ declare namespace monaco.languages.typescript {
* @param formatOptions `typescript.FormatCodeOptions` * @param formatOptions `typescript.FormatCodeOptions`
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>` * @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
*/ */
getCodeFixesAtPosition( getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
fileName: string,
start: number,
end: number,
errorCodes: number[],
formatOptions: any
): Promise<ReadonlyArray<any>>;
/** /**
* Get inlay hints in the range of the file. * Get inlay hints in the range of the file.
* @param fileName * @param fileName
@ -7352,7 +7303,6 @@ declare namespace monaco.languages.typescript {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.css { declare namespace monaco.languages.css {
export interface Options { export interface Options {
readonly validate?: boolean; readonly validate?: boolean;
@ -7523,7 +7473,6 @@ declare namespace monaco.languages.css {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.json { declare namespace monaco.languages.json {
export interface DiagnosticsOptions { export interface DiagnosticsOptions {
/** /**
@ -7636,7 +7585,6 @@ declare namespace monaco.languages.json {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.html { declare namespace monaco.languages.html {
export interface HTMLFormatConfiguration { export interface HTMLFormatConfiguration {
readonly tabSize: number; readonly tabSize: number;
@ -7743,11 +7691,7 @@ declare namespace monaco.languages.html {
* Use this method to register additional language ids with a HTML service. * 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. * The language server has to be registered before an editor model is opened.
*/ */
export function registerHTMLLanguageService( export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
languageId: string,
options?: Options,
modeConfiguration?: ModeConfiguration
): LanguageServiceRegistration;
export interface HTMLDataConfiguration { export interface HTMLDataConfiguration {
/** /**
* Defines whether the standard HTML tags and attributes are shown * Defines whether the standard HTML tags and attributes are shown

View file

@ -859,8 +859,8 @@ embedded: [
<p> <p>
Additional examples can be found in the Additional examples can be found in the
<code class="dt">src</code> folder of the <code class="dt">src/basic-languages</code> folder of the
<a href="https://github.com/microsoft/monaco-languages">monaco-languages</a> <a href="https://github.com/microsoft/monaco-editor">monaco-editor</a>
repo. repo.
</p> </p>
</div> </div>

View file

@ -6910,7 +6910,6 @@ declare namespace monaco.worker {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.typescript { declare namespace monaco.languages.typescript {
export enum ModuleKind { export enum ModuleKind {
None = 0, None = 0,
@ -6953,15 +6952,7 @@ declare namespace monaco.languages.typescript {
interface MapLike<T> { interface MapLike<T> {
[index: string]: T; [index: string]: T;
} }
type CompilerOptionsValue = type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
| string
| number
| boolean
| (string | number)[]
| string[]
| MapLike<string[]>
| null
| undefined;
interface CompilerOptions { interface CompilerOptions {
allowJs?: boolean; allowJs?: boolean;
allowSyntheticDefaultImports?: boolean; allowSyntheticDefaultImports?: boolean;
@ -7099,11 +7090,9 @@ declare namespace monaco.languages.typescript {
category: 0 | 1 | 2 | 3; category: 0 | 1 | 2 | 3;
code: number; code: number;
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */ /** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
file: file: {
| { fileName: string;
fileName: string; } | undefined;
}
| undefined;
start: number | undefined; start: number | undefined;
length: number | undefined; length: number | undefined;
messageText: string | DiagnosticMessageChain; messageText: string | DiagnosticMessageChain;
@ -7149,12 +7138,10 @@ declare namespace monaco.languages.typescript {
* files that won't be loaded as editor documents, like `jquery.d.ts`. * files that won't be loaded as editor documents, like `jquery.d.ts`.
* @param libs An array of entries to register. * @param libs An array of entries to register.
*/ */
setExtraLibs( setExtraLibs(libs: {
libs: { content: string;
content: string; filePath?: string;
filePath?: string; }[]): void;
}[]
): void;
/** /**
* Get current TypeScript compiler options for the language service. * Get current TypeScript compiler options for the language service.
*/ */
@ -7226,20 +7213,12 @@ declare namespace monaco.languages.typescript {
* Get code completion details for the given file, position, and entry. * Get code completion details for the given file, position, and entry.
* @returns `Promise<typescript.CompletionEntryDetails | undefined>` * @returns `Promise<typescript.CompletionEntryDetails | undefined>`
*/ */
getCompletionEntryDetails( getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
fileName: string,
position: number,
entry: string
): Promise<any | undefined>;
/** /**
* Get signature help items for the item at the given file and position. * Get signature help items for the item at the given file and position.
* @returns `Promise<typescript.SignatureHelpItems | undefined>` * @returns `Promise<typescript.SignatureHelpItems | undefined>`
*/ */
getSignatureHelpItems( getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>;
fileName: string,
position: number,
options: any
): Promise<any | undefined>;
/** /**
* Get quick info for the item at the given position in the file. * Get quick info for the item at the given position in the file.
* @returns `Promise<typescript.QuickInfo | undefined>` * @returns `Promise<typescript.QuickInfo | undefined>`
@ -7249,18 +7228,12 @@ declare namespace monaco.languages.typescript {
* Get other ranges which are related to the item at the given position in the file (often used for highlighting). * Get other ranges which are related to the item at the given position in the file (often used for highlighting).
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>` * @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
*/ */
getOccurrencesAtPosition( getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/** /**
* Get the definition of the item at the given position in the file. * Get the definition of the item at the given position in the file.
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>` * @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
*/ */
getDefinitionAtPosition( getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/** /**
* Get references to the item at the given position in the file. * Get references to the item at the given position in the file.
* @returns `Promise<typescript.ReferenceEntry[] | undefined>` * @returns `Promise<typescript.ReferenceEntry[] | undefined>`
@ -7282,34 +7255,18 @@ declare namespace monaco.languages.typescript {
* @param options `typescript.FormatCodeOptions` * @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>` * @returns `Promise<typescript.TextChange[]>`
*/ */
getFormattingEditsForRange( getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
fileName: string,
start: number,
end: number,
options: any
): Promise<any[]>;
/** /**
* Get formatting changes which should be applied after the given keystroke. * Get formatting changes which should be applied after the given keystroke.
* @param options `typescript.FormatCodeOptions` * @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>` * @returns `Promise<typescript.TextChange[]>`
*/ */
getFormattingEditsAfterKeystroke( getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
fileName: string,
postion: number,
ch: string,
options: any
): Promise<any[]>;
/** /**
* Get other occurrences which should be updated when renaming the item at the given file and position. * Get other occurrences which should be updated when renaming the item at the given file and position.
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>` * @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
*/ */
findRenameLocations( findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
fileName: string,
positon: number,
findInStrings: boolean,
findInComments: boolean,
providePrefixAndSuffixTextForRename: boolean
): Promise<readonly any[] | undefined>;
/** /**
* Get edits which should be applied to rename the item at the given file and position (or a failure reason). * Get edits which should be applied to rename the item at the given file and position (or a failure reason).
* @param options `typescript.RenameInfoOptions` * @param options `typescript.RenameInfoOptions`
@ -7326,13 +7283,7 @@ declare namespace monaco.languages.typescript {
* @param formatOptions `typescript.FormatCodeOptions` * @param formatOptions `typescript.FormatCodeOptions`
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>` * @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
*/ */
getCodeFixesAtPosition( getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
fileName: string,
start: number,
end: number,
errorCodes: number[],
formatOptions: any
): Promise<ReadonlyArray<any>>;
/** /**
* Get inlay hints in the range of the file. * Get inlay hints in the range of the file.
* @param fileName * @param fileName
@ -7352,7 +7303,6 @@ declare namespace monaco.languages.typescript {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.css { declare namespace monaco.languages.css {
export interface Options { export interface Options {
readonly validate?: boolean; readonly validate?: boolean;
@ -7523,7 +7473,6 @@ declare namespace monaco.languages.css {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.json { declare namespace monaco.languages.json {
export interface DiagnosticsOptions { export interface DiagnosticsOptions {
/** /**
@ -7636,7 +7585,6 @@ declare namespace monaco.languages.json {
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
declare namespace monaco.languages.html { declare namespace monaco.languages.html {
export interface HTMLFormatConfiguration { export interface HTMLFormatConfiguration {
readonly tabSize: number; readonly tabSize: number;
@ -7743,11 +7691,7 @@ declare namespace monaco.languages.html {
* Use this method to register additional language ids with a HTML service. * 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. * The language server has to be registered before an editor model is opened.
*/ */
export function registerHTMLLanguageService( export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
languageId: string,
options?: Options,
modeConfiguration?: ModeConfiguration
): LanguageServiceRegistration;
export interface HTMLDataConfiguration { export interface HTMLDataConfiguration {
/** /**
* Defines whether the standard HTML tags and attributes are shown * Defines whether the standard HTML tags and attributes are shown

View file

@ -1,41 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const { removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
removeDir(`monaco-html/release`);
removeDir(`monaco-html/out`);
tsc(`monaco-html/src/tsconfig.json`);
dts(
`monaco-html/out/amd/monaco.contribution.d.ts`,
`monaco-html/monaco.d.ts`,
'monaco.languages.html'
);
buildESM({
base: 'monaco-html',
entryPoints: ['src/monaco.contribution.ts', 'src/htmlMode.ts', 'src/html.worker.ts'],
external: ['monaco-editor-core', '*/htmlMode']
});
buildAMD({
base: 'monaco-html',
entryPoint: 'src/monaco.contribution.ts',
amdModuleId: 'vs/language/html/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'monaco-html',
entryPoint: 'src/htmlMode.ts',
amdModuleId: 'vs/language/html/htmlMode'
});
buildAMD({
base: 'monaco-html',
entryPoint: 'src/htmlWorker.ts',
amdModuleId: 'vs/language/html/htmlWorker'
});

View file

@ -1,172 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />
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;
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';
}

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export * from 'monaco-editor-core';

View file

@ -1,10 +0,0 @@
{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"outDir": "../out/amd",
"declaration": true,
"target": "es5",
"lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"]
}
}

View file

@ -1,41 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const { removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
removeDir(`monaco-json/release`);
removeDir(`monaco-json/out`);
tsc(`monaco-json/src/tsconfig.json`);
dts(
`monaco-json/out/amd/monaco.contribution.d.ts`,
`monaco-json/monaco.d.ts`,
'monaco.languages.json'
);
buildESM({
base: 'monaco-json',
entryPoints: ['src/monaco.contribution.ts', 'src/jsonMode.ts', 'src/json.worker.ts'],
external: ['monaco-editor-core', '*/jsonMode']
});
buildAMD({
base: 'monaco-json',
entryPoint: 'src/monaco.contribution.ts',
amdModuleId: 'vs/language/json/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'monaco-json',
entryPoint: 'src/jsonMode.ts',
amdModuleId: 'vs/language/json/jsonMode'
});
buildAMD({
base: 'monaco-json',
entryPoint: 'src/jsonWorker.ts',
amdModuleId: 'vs/language/json/jsonWorker'
});

View file

@ -1,113 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />
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;
}

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export * from 'monaco-editor-core';

View file

@ -1,10 +0,0 @@
{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"outDir": "../out/amd",
"declaration": true,
"target": "es5",
"lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"]
}
}

View file

@ -1,25 +0,0 @@
name: CI
on: [push, pull_request]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- name: npm install
run: npm install
- name: Compile
run: npm run compile
- name: Test
run: npm test

View file

@ -1,58 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const glob = require('glob');
const { removeDir, tsc, buildESM, buildAMD } = require('../build/utils');
removeDir(`monaco-languages/release`);
removeDir(`monaco-languages/out`);
tsc(`monaco-languages/src/tsconfig.json`);
glob('src/*/*.contribution.ts', { cwd: __dirname }, function (err, files) {
if (err) {
console.error(err);
return;
}
const languages = files.map((file) => file.split('/')[1]);
// ESM
{
/** @type {string[]} */
const entryPoints = ['src/monaco.contribution.ts', 'src/_.contribution.ts'];
const external = ['monaco-editor-core', '*/_.contribution'];
for (const language of languages) {
entryPoints.push(`src/${language}/${language}.contribution.ts`);
entryPoints.push(`src/${language}/${language}.ts`);
external.push(`*/${language}.contribution`);
external.push(`*/${language}`);
}
buildESM({
base: 'monaco-languages',
entryPoints,
external
});
}
// AMD
{
buildAMD({
base: 'monaco-languages',
entryPoint: 'src/monaco.contribution.ts',
amdModuleId: 'vs/basic-languages/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
for (const language of languages) {
buildAMD({
base: 'monaco-languages',
entryPoint: `src/${language}/${language}.ts`,
amdModuleId: `vs/basic-languages/${language}/${language}`
});
}
}
});

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export * from 'monaco-editor-core';

View file

@ -1,13 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare function run(): void;
declare function suite(name: string, fn: (err?: any) => void): void;
declare function test(name: string, fn: (done: (err?: any) => void) => void): void;
declare function suiteSetup(fn: (done: (err?: any) => void) => void): void;
declare function suiteTeardown(fn: (done: (err?: any) => void) => void): void;
declare function setup(fn: (done: (err?: any) => void) => void): void;
declare function teardown(fn: (done: (err?: any) => void) => void): void;

View file

@ -1,10 +0,0 @@
{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"outDir": "../out/amd",
"target": "es5",
"strict": true,
"lib": ["dom", "es5", "es2015.collection", "es2015.iterable", "es2015.promise"]
}
}

View file

@ -1,16 +0,0 @@
name: 'CI'
on: [push, pull_request]
jobs:
build:
name: 'Builds and Compiles'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: npm install
- run: npm run import-typescript
- run: npm run compile
- run: npm run prepublishOnly

View file

@ -1,47 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const { copyFile, removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
removeDir(`monaco-typescript/release`);
removeDir(`monaco-typescript/out`);
copyFile(
`monaco-typescript/src/lib/typescriptServices-amd.js`,
`monaco-typescript/out/amd/lib/typescriptServices.js`
);
tsc(`monaco-typescript/src/tsconfig.json`);
dts(
`monaco-typescript/out/amd/monaco.contribution.d.ts`,
`monaco-typescript/monaco.d.ts`,
'monaco.languages.typescript'
);
buildESM({
base: 'monaco-typescript',
entryPoints: ['src/monaco.contribution.ts', 'src/tsMode.ts', 'src/ts.worker.ts'],
external: ['monaco-editor-core', '*/tsMode']
});
buildAMD({
base: 'monaco-typescript',
entryPoint: 'src/monaco.contribution.ts',
amdModuleId: 'vs/language/typescript/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'monaco-typescript',
entryPoint: 'src/tsMode.ts',
amdModuleId: 'vs/language/typescript/tsMode'
});
buildAMD({
base: 'monaco-typescript',
entryPoint: 'src/tsWorker.ts',
amdModuleId: 'vs/language/typescript/tsWorker',
amdDependencies: []
});

View file

@ -1,442 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path="../node_modules/monaco-editor-core/monaco.d.ts" />
declare namespace monaco.languages.typescript {
export enum ModuleKind {
None = 0,
CommonJS = 1,
AMD = 2,
UMD = 3,
System = 4,
ES2015 = 5,
ESNext = 99
}
export enum JsxEmit {
None = 0,
Preserve = 1,
React = 2,
ReactNative = 3,
ReactJSX = 4,
ReactJSXDev = 5
}
export enum NewLineKind {
CarriageReturnLineFeed = 0,
LineFeed = 1
}
export enum ScriptTarget {
ES3 = 0,
ES5 = 1,
ES2015 = 2,
ES2016 = 3,
ES2017 = 4,
ES2018 = 5,
ES2019 = 6,
ES2020 = 7,
ESNext = 99,
JSON = 100,
Latest = 99
}
export enum ModuleResolutionKind {
Classic = 1,
NodeJs = 2
}
interface MapLike<T> {
[index: string]: T;
}
type CompilerOptionsValue =
| string
| number
| boolean
| (string | number)[]
| string[]
| MapLike<string[]>
| null
| undefined;
interface CompilerOptions {
allowJs?: boolean;
allowSyntheticDefaultImports?: boolean;
allowUmdGlobalAccess?: boolean;
allowUnreachableCode?: boolean;
allowUnusedLabels?: boolean;
alwaysStrict?: boolean;
baseUrl?: string;
charset?: string;
checkJs?: boolean;
declaration?: boolean;
declarationMap?: boolean;
emitDeclarationOnly?: boolean;
declarationDir?: string;
disableSizeLimit?: boolean;
disableSourceOfProjectReferenceRedirect?: boolean;
downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
importHelpers?: boolean;
inlineSourceMap?: boolean;
inlineSources?: boolean;
isolatedModules?: boolean;
jsx?: JsxEmit;
keyofStringsOnly?: boolean;
lib?: string[];
locale?: string;
mapRoot?: string;
maxNodeModuleJsDepth?: number;
module?: ModuleKind;
moduleResolution?: ModuleResolutionKind;
newLine?: NewLineKind;
noEmit?: boolean;
noEmitHelpers?: boolean;
noEmitOnError?: boolean;
noErrorTruncation?: boolean;
noFallthroughCasesInSwitch?: boolean;
noImplicitAny?: boolean;
noImplicitReturns?: boolean;
noImplicitThis?: boolean;
noStrictGenericChecks?: boolean;
noUnusedLocals?: boolean;
noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean;
noLib?: boolean;
noResolve?: boolean;
out?: string;
outDir?: string;
outFile?: string;
paths?: MapLike<string[]>;
preserveConstEnums?: boolean;
preserveSymlinks?: boolean;
project?: string;
reactNamespace?: string;
jsxFactory?: string;
composite?: boolean;
removeComments?: boolean;
rootDir?: string;
rootDirs?: string[];
skipLibCheck?: boolean;
skipDefaultLibCheck?: boolean;
sourceMap?: boolean;
sourceRoot?: string;
strict?: boolean;
strictFunctionTypes?: boolean;
strictBindCallApply?: boolean;
strictNullChecks?: boolean;
strictPropertyInitialization?: boolean;
stripInternal?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
target?: ScriptTarget;
traceResolution?: boolean;
resolveJsonModule?: boolean;
types?: string[];
/** Paths used to compute primary types search locations */
typeRoots?: string[];
esModuleInterop?: boolean;
useDefineForClassFields?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
export interface DiagnosticsOptions {
noSemanticValidation?: boolean;
noSyntaxValidation?: boolean;
noSuggestionDiagnostics?: boolean;
/**
* Limit diagnostic computation to only visible files.
* Defaults to false.
*/
onlyVisible?: boolean;
diagnosticCodesToIgnore?: number[];
}
export interface WorkerOptions {
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
customWorkerPath?: string;
}
interface InlayHintsOptions {
readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
interface IExtraLib {
content: string;
version: number;
}
export interface IExtraLibs {
[path: string]: IExtraLib;
}
/**
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
*/
interface DiagnosticMessageChain {
messageText: string;
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
category: 0 | 1 | 2 | 3;
code: number;
next?: DiagnosticMessageChain[];
}
export interface Diagnostic extends DiagnosticRelatedInformation {
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
reportsUnnecessary?: {};
reportsDeprecated?: {};
source?: string;
relatedInformation?: DiagnosticRelatedInformation[];
}
export interface DiagnosticRelatedInformation {
/** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
category: 0 | 1 | 2 | 3;
code: number;
/** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
file:
| {
fileName: string;
}
| undefined;
start: number | undefined;
length: number | undefined;
messageText: string | DiagnosticMessageChain;
}
interface EmitOutput {
outputFiles: OutputFile[];
emitSkipped: boolean;
}
interface OutputFile {
name: string;
writeByteOrderMark: boolean;
text: string;
}
export interface LanguageServiceDefaults {
/**
* Event fired when compiler options or diagnostics options are changed.
*/
readonly onDidChange: IEvent<void>;
/**
* Event fired when extra libraries registered with the language service change.
*/
readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions;
/**
* Get the current extra libs registered with the language service.
*/
getExtraLibs(): IExtraLibs;
/**
* Add an additional source file to the language service. Use this
* for typescript (definition) files that won't be loaded as editor
* documents, like `jquery.d.ts`.
*
* @param content The file content
* @param filePath An optional file path
* @returns A disposable which will remove the file from the
* language service upon disposal.
*/
addExtraLib(content: string, filePath?: string): IDisposable;
/**
* Remove all existing extra libs and set the additional source
* files to the language service. Use this for typescript definition
* files that won't be loaded as editor documents, like `jquery.d.ts`.
* @param libs An array of entries to register.
*/
setExtraLibs(
libs: {
content: string;
filePath?: string;
}[]
): void;
/**
* Get current TypeScript compiler options for the language service.
*/
getCompilerOptions(): CompilerOptions;
/**
* Set TypeScript compiler options.
*/
setCompilerOptions(options: CompilerOptions): void;
/**
* Get the current diagnostics options for the language service.
*/
getDiagnosticsOptions(): DiagnosticsOptions;
/**
* Configure whether syntactic and/or semantic validation should
* be performed
*/
setDiagnosticsOptions(options: DiagnosticsOptions): void;
/**
* Configure webworker options
*/
setWorkerOptions(options: WorkerOptions): void;
/**
* No-op.
*/
setMaximumWorkerIdleTime(value: number): void;
/**
* Configure if all existing models should be eagerly sync'd
* to the worker on start or restart.
*/
setEagerModelSync(value: boolean): void;
/**
* Get the current setting for whether all existing models should be eagerly sync'd
* to the worker on start or restart.
*/
getEagerModelSync(): boolean;
/**
* Configure inlay hints options.
*/
setInlayHintsOptions(options: InlayHintsOptions): void;
}
export interface TypeScriptWorker {
/**
* Get diagnostic messages for any syntax issues in the given file.
*/
getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>;
/**
* Get diagnostic messages for any semantic issues in the given file.
*/
getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>;
/**
* Get diagnostic messages for any suggestions related to the given file.
*/
getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>;
/**
* Get the content of a given file.
*/
getScriptText(fileName: string): Promise<string | undefined>;
/**
* Get diagnostic messages related to the current compiler options.
* @param fileName Not used
*/
getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
/**
* Get code completions for the given file and position.
* @returns `Promise<typescript.CompletionInfo | undefined>`
*/
getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
/**
* Get code completion details for the given file, position, and entry.
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
*/
getCompletionEntryDetails(
fileName: string,
position: number,
entry: string
): Promise<any | undefined>;
/**
* Get signature help items for the item at the given file and position.
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
*/
getSignatureHelpItems(
fileName: string,
position: number,
options: any
): Promise<any | undefined>;
/**
* Get quick info for the item at the given position in the file.
* @returns `Promise<typescript.QuickInfo | undefined>`
*/
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
/**
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
*/
getOccurrencesAtPosition(
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/**
* Get the definition of the item at the given position in the file.
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
*/
getDefinitionAtPosition(
fileName: string,
position: number
): Promise<ReadonlyArray<any> | undefined>;
/**
* Get references to the item at the given position in the file.
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
*/
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
/**
* Get outline entries for the item at the given position in the file.
* @returns `Promise<typescript.NavigationBarItem[]>`
*/
getNavigationBarItems(fileName: string): Promise<any[]>;
/**
* Get changes which should be applied to format the given file.
* @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>`
*/
getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
/**
* Get changes which should be applied to format the given range in the file.
* @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>`
*/
getFormattingEditsForRange(
fileName: string,
start: number,
end: number,
options: any
): Promise<any[]>;
/**
* Get formatting changes which should be applied after the given keystroke.
* @param options `typescript.FormatCodeOptions`
* @returns `Promise<typescript.TextChange[]>`
*/
getFormattingEditsAfterKeystroke(
fileName: string,
postion: number,
ch: string,
options: any
): Promise<any[]>;
/**
* Get other occurrences which should be updated when renaming the item at the given file and position.
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
*/
findRenameLocations(
fileName: string,
positon: number,
findInStrings: boolean,
findInComments: boolean,
providePrefixAndSuffixTextForRename: boolean
): Promise<readonly any[] | undefined>;
/**
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
* @param options `typescript.RenameInfoOptions`
* @returns `Promise<typescript.RenameInfo>`
*/
getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
/**
* Get transpiled output for the given file.
* @returns `typescript.EmitOutput`
*/
getEmitOutput(fileName: string): Promise<EmitOutput>;
/**
* Get possible code fixes at the given position in the file.
* @param formatOptions `typescript.FormatCodeOptions`
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
*/
getCodeFixesAtPosition(
fileName: string,
start: number,
end: number,
errorCodes: number[],
formatOptions: any
): Promise<ReadonlyArray<any>>;
/**
* Get inlay hints in the range of the file.
* @param fileName
* @returns `Promise<typescript.InlayHint[]>`
*/
provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
}
export const typescriptVersion: string;
export const typescriptDefaults: LanguageServiceDefaults;
export const javascriptDefaults: LanguageServiceDefaults;
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
}

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export * from 'monaco-editor-core';

View file

@ -1,11 +0,0 @@
{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"outDir": "../out/amd",
"declaration": true,
"target": "es5",
"lib": ["dom", "es5", "es2015.collection", "es2015.iterable", "es2015.promise"],
"strict": true
}
}

204
package-lock.json generated
View file

@ -164,15 +164,6 @@
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"ansi-wrap": { "ansi-wrap": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
@ -606,17 +597,6 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true "dev": true
}, },
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"chokidar": { "chokidar": {
"version": "2.1.8", "version": "2.1.8",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
@ -736,21 +716,6 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"color-support": { "color-support": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
@ -841,19 +806,6 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true "dev": true
}, },
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true,
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"cssesc": { "cssesc": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
@ -1431,12 +1383,6 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"escodegen": { "escodegen": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
@ -2092,12 +2038,6 @@
"call-bind": "^1.0.2" "call-bind": "^1.0.2"
} }
}, },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-symbols": { "has-symbols": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
@ -2745,12 +2685,6 @@
} }
} }
}, },
"json-parse-better-errors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
"json-schema": { "json-schema": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@ -2979,12 +2913,6 @@
} }
} }
}, },
"memorystream": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
"integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
"dev": true
},
"micromatch": { "micromatch": {
"version": "3.1.10", "version": "3.1.10",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
@ -3113,12 +3041,6 @@
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
"dev": true "dev": true
}, },
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
"normalize-package-data": { "normalize-package-data": {
"version": "2.5.0", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
@ -3146,79 +3068,6 @@
"once": "^1.3.2" "once": "^1.3.2"
} }
}, },
"npm-run-all": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
"integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"chalk": "^2.4.1",
"cross-spawn": "^6.0.5",
"memorystream": "^0.3.1",
"minimatch": "^3.0.4",
"pidtree": "^0.3.0",
"read-pkg": "^3.0.0",
"shell-quote": "^1.6.1",
"string.prototype.padend": "^3.0.0"
},
"dependencies": {
"load-json-file": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^4.0.0",
"pify": "^3.0.0",
"strip-bom": "^3.0.0"
}
},
"parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
"requires": {
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1"
}
},
"path-type": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
"dev": true,
"requires": {
"pify": "^3.0.0"
}
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"dev": true
},
"read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
"dev": true,
"requires": {
"load-json-file": "^4.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^3.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
}
}
},
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
@ -3475,12 +3324,6 @@
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true "dev": true
}, },
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
"path-parse": { "path-parse": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@ -3528,12 +3371,6 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true "dev": true
}, },
"pidtree": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
"integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
"dev": true
},
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
@ -4006,27 +3843,6 @@
} }
} }
}, },
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
"shell-quote": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
"integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==",
"dev": true
},
"shiki": { "shiki": {
"version": "0.9.12", "version": "0.9.12",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz",
@ -4336,17 +4152,6 @@
"strip-ansi": "^3.0.0" "strip-ansi": "^3.0.0"
} }
}, },
"string.prototype.padend": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz",
"integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==",
"dev": true,
"requires": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.3",
"es-abstract": "^1.19.1"
}
},
"string.prototype.trim": { "string.prototype.trim": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz",
@ -4405,15 +4210,6 @@
"is-utf8": "^0.2.0" "is-utf8": "^0.2.0"
} }
}, },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"sver-compat": { "sver-compat": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",

View file

@ -7,22 +7,12 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"simpleserver": "gulp simpleserver", "simpleserver": "gulp simpleserver",
"import-typescript": "node ./monaco-typescript/importTypescript", "import-typescript": "node ./build/importTypescript",
"watch-css": "tsc -w -p ./monaco-css/src", "watch": "tsc -w -p ./src",
"watch-html": "tsc -w -p ./monaco-html/src", "release-plugins": "node ./build/build",
"watch-json": "tsc -w -p ./monaco-json/src", "test": "node ./test/unit/all.js",
"watch-languages": "tsc -w -p ./monaco-languages/src",
"watch-typescript": "tsc -w -p ./monaco-typescript/src",
"watch": "npm-run-all -lp watch-css watch-html watch-json watch-languages watch-typescript",
"release-css": "node ./monaco-css/build",
"release-html": "node ./monaco-html/build",
"release-json": "node ./monaco-json/build",
"release-languages": "node ./monaco-languages/build",
"release-typescript": "node ./monaco-typescript/build",
"release-plugins": "npm-run-all -lp release-css release-html release-json release-languages release-typescript",
"test": "node ./monaco-languages/test/all.js",
"gulp-release": "gulp release", "gulp-release": "gulp release",
"release": "npm-run-all -ls release-plugins gulp-release", "release": "npm run release-plugins && npm run gulp-release",
"website": "gulp build-website && npm run typedoc && gulp prepare-website-branch", "website": "gulp build-website && npm run typedoc && gulp prepare-website-branch",
"build-website": "gulp build-website && npm run typedoc", "build-website": "gulp build-website && npm run typedoc",
"typedoc": "cd monaco-editor/typedoc && \"../../node_modules/.bin/typedoc\" --options ./typedoc.json", "typedoc": "cd monaco-editor/typedoc && \"../../node_modules/.bin/typedoc\" --options ./typedoc.json",
@ -48,7 +38,6 @@
"jsdom": "^17.0.0", "jsdom": "^17.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"monaco-editor-core": "0.30.1", "monaco-editor-core": "0.30.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1", "prettier": "^2.4.1",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { languages } from './fillers/monaco-editor-core'; import { languages } from '../fillers/monaco-editor-core';
interface ILang extends languages.ILanguageExtensionPoint { interface ILang extends languages.ILanguageExtensionPoint {
loader: () => Promise<ILangImpl>; loader: () => Promise<ILangImpl>;

View file

@ -8,9 +8,6 @@
* *
* Based on SAP ABAP Application Server 7.55 * Based on SAP ABAP Application Server 7.55
* *
* Definition:
* https://github.com/microsoft/monaco-languages/blob/master/src/abap/abap.ts
*
* Reference: * Reference:
* https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abenabap_words.htm * https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abenabap_words.htm
* https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abenabap_index.htm * https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abenabap_index.htm
@ -22,7 +19,7 @@
* https://github.com/Microsoft/vscode/blob/master/src/vs/editor/standalone/common/themes.ts * https://github.com/Microsoft/vscode/blob/master/src/vs/editor/standalone/common/themes.ts
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `@$` // the default separators except `@$`

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License. // Licensed under the MIT License.
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
const bounded = (text: string) => `\\b${text}\\b`; const bounded = (text: string) => `\\b${text}\\b`;

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: wordPattern:

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: wordPattern:

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
brackets: [], brackets: [],

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g, wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
brackets: [ brackets: [

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

View file

@ -3,7 +3,7 @@
* 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.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
comments: { comments: {

Some files were not shown because too many files have changed in this diff Show more