mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
0.7.0
This commit is contained in:
parent
a88225bcf0
commit
9ff02988e6
3 changed files with 225 additions and 123 deletions
|
|
@ -75,17 +75,21 @@ declare module monaco {
|
|||
public cancel(): void;
|
||||
|
||||
public static as<ValueType>(value: ValueType): Promise<ValueType>;
|
||||
public static is(value: any): value is Promise<any>;
|
||||
public static is(value: any): value is Thenable<any>;
|
||||
public static timeout(delay: number): Promise<void>;
|
||||
public static join<ValueType>(promises: Promise<ValueType>[]): Promise<ValueType[]>;
|
||||
public static join<ValueType>(promises: Thenable<ValueType>[]): Thenable<ValueType[]>;
|
||||
public static join<ValueType>(promises: { [n: string]: Promise<ValueType> }): Promise<{ [n: string]: ValueType }>;
|
||||
public static any<ValueType>(promises: Promise<ValueType>[]): Promise<{ key: string; value: Promise<ValueType>; }>;
|
||||
|
||||
public static wrap<ValueType>(value: Thenable<ValueType>): Promise<ValueType>;
|
||||
public static wrap<ValueType>(value: ValueType): Promise<ValueType>;
|
||||
|
||||
public static wrapError<ValueType>(error: any): Promise<ValueType>;
|
||||
}
|
||||
|
||||
export class CancellationTokenSource {
|
||||
token: CancellationToken;
|
||||
readonly token: CancellationToken;
|
||||
cancel(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
|
@ -112,36 +116,36 @@ declare module monaco {
|
|||
*/
|
||||
export class Uri {
|
||||
static isUri(thing: any): thing is Uri;
|
||||
constructor();
|
||||
protected constructor();
|
||||
/**
|
||||
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
* The part before the first colon.
|
||||
*/
|
||||
scheme: string;
|
||||
readonly scheme: string;
|
||||
/**
|
||||
* authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
* The part between the first double slashes and the next slash.
|
||||
*/
|
||||
authority: string;
|
||||
readonly authority: string;
|
||||
/**
|
||||
* path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
*/
|
||||
path: string;
|
||||
readonly path: string;
|
||||
/**
|
||||
* query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
*/
|
||||
query: string;
|
||||
readonly query: string;
|
||||
/**
|
||||
* fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
*/
|
||||
fragment: string;
|
||||
readonly fragment: string;
|
||||
/**
|
||||
* Returns a string representing the corresponding file system path of this Uri.
|
||||
* Will handle UNC paths and normalize windows drive letters to lower-case. Also
|
||||
* uses the platform specific path separator. Will *not* validate the path for
|
||||
* invalid characters and semantics. Will *not* look at the scheme of this Uri.
|
||||
*/
|
||||
fsPath: string;
|
||||
readonly fsPath: string;
|
||||
with(change: {
|
||||
scheme?: string;
|
||||
authority?: string;
|
||||
|
|
@ -337,6 +341,7 @@ declare module monaco {
|
|||
NUMPAD_DIVIDE = 108,
|
||||
/**
|
||||
* Placed last to cover the length of the enum.
|
||||
* Please do not depend on this value!
|
||||
*/
|
||||
MAX_VALUE = 109,
|
||||
}
|
||||
|
|
@ -740,14 +745,14 @@ declare module monaco.editor {
|
|||
* `domElement` should be empty (not contain other dom nodes).
|
||||
* The editor will read the size of `domElement`.
|
||||
*/
|
||||
export function create(domElement: HTMLElement, options?: IEditorConstructionOptions, services?: IEditorOverrideServices): IStandaloneCodeEditor;
|
||||
export function create(domElement: HTMLElement, options?: IEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneCodeEditor;
|
||||
|
||||
/**
|
||||
* Create a new diff editor under `domElement`.
|
||||
* `domElement` should be empty (not contain other dom nodes).
|
||||
* The editor will read the size of `domElement`.
|
||||
*/
|
||||
export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, services?: IEditorOverrideServices): IStandaloneDiffEditor;
|
||||
export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
|
||||
|
||||
export interface IDiffNavigator {
|
||||
canNavigate(): boolean;
|
||||
|
|
@ -808,6 +813,27 @@ declare module monaco.editor {
|
|||
oldLanguage: string;
|
||||
}) => void): IDisposable;
|
||||
|
||||
/**
|
||||
* Create a new web worker that has model syncing capabilities built in.
|
||||
* Specify an AMD module to load that will `create` an object that will be proxied.
|
||||
*/
|
||||
export function createWebWorker<T>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
|
||||
|
||||
/**
|
||||
* Colorize the contents of `domNode` using attribute `data-lang`.
|
||||
*/
|
||||
export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Colorize `text` using language `languageId`.
|
||||
*/
|
||||
export function colorize(text: string, languageId: string, options: IColorizerOptions): Promise<string>;
|
||||
|
||||
/**
|
||||
* Colorize a line in a model.
|
||||
*/
|
||||
export function colorizeModelLine(model: IModel, lineNumber: number, tabSize?: number): string;
|
||||
|
||||
/**
|
||||
* A web worker that can provide a proxy to an arbitrary file.
|
||||
*/
|
||||
|
|
@ -837,29 +863,12 @@ declare module monaco.editor {
|
|||
* The data to send over when calling create on the module.
|
||||
*/
|
||||
createData?: any;
|
||||
/**
|
||||
* A label to be used to identify the web worker for debugging purposes.
|
||||
*/
|
||||
label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new web worker that has model syncing capabilities built in.
|
||||
* Specify an AMD module to load that will `create` an object that will be proxied.
|
||||
*/
|
||||
export function createWebWorker<T>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
|
||||
|
||||
/**
|
||||
* Colorize the contents of `domNode` using attribute `data-lang`.
|
||||
*/
|
||||
export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Colorize `text` using language `languageId`.
|
||||
*/
|
||||
export function colorize(text: string, languageId: string, options: IColorizerOptions): Promise<string>;
|
||||
|
||||
/**
|
||||
* Colorize a line in a model.
|
||||
*/
|
||||
export function colorizeModelLine(model: IModel, lineNumber: number, tabSize?: number): string;
|
||||
|
||||
/**
|
||||
* The options to create an editor.
|
||||
*/
|
||||
|
|
@ -1026,6 +1035,8 @@ declare module monaco.editor {
|
|||
Indent = 2,
|
||||
}
|
||||
|
||||
export type LineNumbersOption = 'on' | 'off' | 'relative' | ((lineNumber: number) => string);
|
||||
|
||||
/**
|
||||
* Configuration options for the editor.
|
||||
*/
|
||||
|
|
@ -1061,7 +1072,7 @@ declare module monaco.editor {
|
|||
* Otherwise, line numbers will not be rendered.
|
||||
* Defaults to true.
|
||||
*/
|
||||
lineNumbers?: any;
|
||||
lineNumbers?: LineNumbersOption;
|
||||
/**
|
||||
* Should the corresponding line be selected when clicking on the line number?
|
||||
* Defaults to true.
|
||||
|
|
@ -1278,10 +1289,10 @@ declare module monaco.editor {
|
|||
*/
|
||||
folding?: boolean;
|
||||
/**
|
||||
* Enable rendering of leading whitespace.
|
||||
* Defaults to false.
|
||||
* Enable rendering of whitespace.
|
||||
* Defaults to none.
|
||||
*/
|
||||
renderWhitespace?: boolean;
|
||||
renderWhitespace?: 'none' | 'boundary' | 'all';
|
||||
/**
|
||||
* Enable rendering of control characters.
|
||||
* Defaults to false.
|
||||
|
|
@ -1378,7 +1389,9 @@ declare module monaco.editor {
|
|||
experimentalScreenReader: boolean;
|
||||
rulers: number[];
|
||||
ariaLabel: string;
|
||||
lineNumbers: any;
|
||||
renderLineNumbers: boolean;
|
||||
renderCustomLineNumbers: (lineNumber: number) => string;
|
||||
renderRelativeLineNumbers: boolean;
|
||||
selectOnLineNumbers: boolean;
|
||||
glyphMargin: boolean;
|
||||
revealHorizontalRightPadding: number;
|
||||
|
|
@ -1391,7 +1404,7 @@ declare module monaco.editor {
|
|||
scrollBeyondLastLine: boolean;
|
||||
editorClassName: string;
|
||||
stopRenderingLineAfter: number;
|
||||
renderWhitespace: boolean;
|
||||
renderWhitespace: 'none' | 'boundary' | 'all';
|
||||
renderControlCharacters: boolean;
|
||||
renderIndentGuides: boolean;
|
||||
renderLineHighlight: boolean;
|
||||
|
|
@ -1404,7 +1417,9 @@ declare module monaco.editor {
|
|||
experimentalScreenReader: boolean;
|
||||
rulers: boolean;
|
||||
ariaLabel: boolean;
|
||||
lineNumbers: boolean;
|
||||
renderLineNumbers: boolean;
|
||||
renderCustomLineNumbers: boolean;
|
||||
renderRelativeLineNumbers: boolean;
|
||||
selectOnLineNumbers: boolean;
|
||||
glyphMargin: boolean;
|
||||
revealHorizontalRightPadding: boolean;
|
||||
|
|
@ -1948,6 +1963,48 @@ declare module monaco.editor {
|
|||
* Returns iff the model was disposed or not.
|
||||
*/
|
||||
isDisposed(): boolean;
|
||||
/**
|
||||
* Search the model.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @param limitResultCount Limit the number of results
|
||||
* @return The ranges where the matches are. It is empty if not matches have been found.
|
||||
*/
|
||||
findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, limitResultCount?: number): Range[];
|
||||
/**
|
||||
* Search the model.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchScope Limit the searching to only search inside this range.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @param limitResultCount Limit the number of results
|
||||
* @return The ranges where the matches are. It is empty if no matches have been found.
|
||||
*/
|
||||
findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, limitResultCount?: number): Range[];
|
||||
/**
|
||||
* Search the model for the next match. Loops to the beginning of the model if needed.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchStart Start the searching at the specified position.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @return The range where the next match is. It is null if no next match has been found.
|
||||
*/
|
||||
findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean): Range;
|
||||
/**
|
||||
* Search the model for the previous match. Loops to the end of the model if needed.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchStart Start the searching at the specified position.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @return The range where the previous match is. It is null if no previous match has been found.
|
||||
*/
|
||||
findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean): Range;
|
||||
}
|
||||
|
||||
export interface IReadOnlyModel extends ITextModel {
|
||||
|
|
@ -1984,9 +2041,9 @@ declare module monaco.editor {
|
|||
*/
|
||||
getMode(): languages.IMode;
|
||||
/**
|
||||
* Set the current language mode associated with the model.
|
||||
* Get the language associated with this model.
|
||||
*/
|
||||
setMode(newMode: languages.IMode | Promise<languages.IMode>): void;
|
||||
getModeId(): string;
|
||||
/**
|
||||
* Get the word under or besides `position`.
|
||||
* @param position The position to look for a word.
|
||||
|
|
@ -2163,48 +2220,6 @@ declare module monaco.editor {
|
|||
* and make all necessary clean-up to release this object to the GC.
|
||||
*/
|
||||
dispose(): void;
|
||||
/**
|
||||
* Search the model.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @param limitResultCount Limit the number of results
|
||||
* @return The ranges where the matches are. It is empty if not matches have been found.
|
||||
*/
|
||||
findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, limitResultCount?: number): Range[];
|
||||
/**
|
||||
* Search the model.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchScope Limit the searching to only search inside this range.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @param limitResultCount Limit the number of results
|
||||
* @return The ranges where the matches are. It is empty if no matches have been found.
|
||||
*/
|
||||
findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, limitResultCount?: number): Range[];
|
||||
/**
|
||||
* Search the model for the next match. Loops to the beginning of the model if needed.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchStart Start the searching at the specified position.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @return The range where the next match is. It is null if no next match has been found.
|
||||
*/
|
||||
findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean): Range;
|
||||
/**
|
||||
* Search the model for the previous match. Loops to the end of the model if needed.
|
||||
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
|
||||
* @param searchStart Start the searching at the specified position.
|
||||
* @param isRegex Used to indicate that `searchString` is a regular expression.
|
||||
* @param matchCase Force the matching to match lower/upper case exactly.
|
||||
* @param wholeWord Force the matching to match entire words only.
|
||||
* @return The range where the previous match is. It is null if no previous match has been found.
|
||||
*/
|
||||
findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean): Range;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2761,6 +2776,20 @@ declare module monaco.editor {
|
|||
* An array of keybindings for the action.
|
||||
*/
|
||||
keybindings?: number[];
|
||||
/**
|
||||
* Control if the action should show up in the context menu and where.
|
||||
* The context menu of the editor has these default:
|
||||
* navigation - The navigation group comes first in all cases.
|
||||
* 1_modification - This group comes next and contains commands that modify your code.
|
||||
* 9_cutcopypaste - The last default group with the basic editing commands.
|
||||
* You can also create your own group.
|
||||
* Defaults to null (don't show in context menu).
|
||||
*/
|
||||
contextMenuGroupId?: string;
|
||||
/**
|
||||
* Control the order in the context menu group.
|
||||
*/
|
||||
contextMenuOrder?: number;
|
||||
/**
|
||||
* The keybinding rule.
|
||||
*/
|
||||
|
|
@ -4018,8 +4047,8 @@ declare module monaco.languages {
|
|||
*/
|
||||
indentationRules?: IndentationRule;
|
||||
/**
|
||||
* The language's rules to be evaluated when pressing Enter.
|
||||
*/
|
||||
* The language's rules to be evaluated when pressing Enter.
|
||||
*/
|
||||
onEnterRules?: OnEnterRule[];
|
||||
/**
|
||||
* The language's auto closing pairs. The 'close' character is automatically inserted with the
|
||||
|
|
@ -4870,38 +4899,38 @@ declare module monaco.languages.typescript {
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
declare module monaco.languages.css {
|
||||
export interface DiagnosticsOptions {
|
||||
validate?: boolean;
|
||||
lint?: {
|
||||
compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error',
|
||||
vendorPrefix?: 'ignore' | 'warning' | 'error',
|
||||
duplicateProperties?: 'ignore' | 'warning' | 'error',
|
||||
emptyRules?: 'ignore' | 'warning' | 'error',
|
||||
importStatement?: 'ignore' | 'warning' | 'error',
|
||||
boxModel?: 'ignore' | 'warning' | 'error',
|
||||
universalSelector?: 'ignore' | 'warning' | 'error',
|
||||
zeroUnits?: 'ignore' | 'warning' | 'error',
|
||||
fontFaceProperties?: 'ignore' | 'warning' | 'error',
|
||||
hexColorLength?: 'ignore' | 'warning' | 'error',
|
||||
argumentsInColorFunction?: 'ignore' | 'warning' | 'error',
|
||||
unknownProperties?: 'ignore' | 'warning' | 'error',
|
||||
ieHack?: 'ignore' | 'warning' | 'error',
|
||||
unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error',
|
||||
propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error',
|
||||
important?: 'ignore' | 'warning' | 'error',
|
||||
float?: 'ignore' | 'warning' | 'error',
|
||||
idSelector?: 'ignore' | 'warning' | 'error'
|
||||
export interface DiagnosticsOptions {
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
diagnosticsOptions: DiagnosticsOptions;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var scssDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
|
|
@ -4914,35 +4943,79 @@ declare module monaco.languages.json {
|
|||
/**
|
||||
* If set, the validator will be enabled and perform syntax validation as well as schema based validation.
|
||||
*/
|
||||
validate?: boolean;
|
||||
readonly validate?: boolean;
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emmited for comments.
|
||||
*/
|
||||
allowComments?: boolean;
|
||||
readonly allowComments?: boolean;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
schemas?: {
|
||||
readonly schemas?: {
|
||||
/**
|
||||
* The URI of the schema, which is also the identifier of the schema.
|
||||
*/
|
||||
uri: string;
|
||||
readonly uri: string;
|
||||
/**
|
||||
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json'
|
||||
*/
|
||||
fileMatch?: string[];
|
||||
readonly fileMatch?: string[];
|
||||
/**
|
||||
* The schema for the given URI.
|
||||
*/
|
||||
schema?: any;
|
||||
readonly schema?: any;
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
|
||||
export var jsonDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
readonly insertSpaces: boolean;
|
||||
readonly wrapLineLength: number;
|
||||
readonly unformatted: string;
|
||||
readonly indentInnerHtml: boolean;
|
||||
readonly preserveNewLines: boolean;
|
||||
readonly maxPreserveNewLines: number;
|
||||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
}
|
||||
|
||||
export interface CompletionConfiguration {
|
||||
[provider: string]: boolean;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emmited for comments.
|
||||
*/
|
||||
readonly format?: HTMLFormatConfiguration;
|
||||
/**
|
||||
* A list of known schemas and/or associations of schemas to file names.
|
||||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
}
|
||||
|
||||
export var htmlDefaults: LanguageServiceDefaults;
|
||||
export var handlebarDefaults: LanguageServiceDefaults;
|
||||
export var razorDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue