|
@@ -1215,6 +1215,11 @@ declare module monaco.editor {
|
|
* Defaults to false.
|
|
* Defaults to false.
|
|
*/
|
|
*/
|
|
disableTranslate3d?: boolean;
|
|
disableTranslate3d?: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Disable the optimizations for monospace fonts.
|
|
|
|
+ * Defaults to false.
|
|
|
|
+ */
|
|
|
|
+ disableMonospaceOptimizations?: boolean;
|
|
/**
|
|
/**
|
|
* Should the cursor be hidden in the overview ruler.
|
|
* Should the cursor be hidden in the overview ruler.
|
|
* Defaults to false.
|
|
* Defaults to false.
|
|
@@ -1315,6 +1320,11 @@ declare module monaco.editor {
|
|
* Defaults to false.
|
|
* Defaults to false.
|
|
*/
|
|
*/
|
|
formatOnType?: boolean;
|
|
formatOnType?: boolean;
|
|
|
|
+ /**
|
|
|
|
+ * Enable format on paste.
|
|
|
|
+ * Defaults to false.
|
|
|
|
+ */
|
|
|
|
+ formatOnPaste?: boolean;
|
|
/**
|
|
/**
|
|
* Enable the suggestion box to pop-up on trigger characters.
|
|
* Enable the suggestion box to pop-up on trigger characters.
|
|
* Defaults to true.
|
|
* Defaults to true.
|
|
@@ -1474,6 +1484,7 @@ declare module monaco.editor {
|
|
readonly _internalEditorViewOptionsBrand: void;
|
|
readonly _internalEditorViewOptionsBrand: void;
|
|
readonly theme: string;
|
|
readonly theme: string;
|
|
readonly canUseTranslate3d: boolean;
|
|
readonly canUseTranslate3d: boolean;
|
|
|
|
+ readonly disableMonospaceOptimizations: boolean;
|
|
readonly experimentalScreenReader: boolean;
|
|
readonly experimentalScreenReader: boolean;
|
|
readonly rulers: number[];
|
|
readonly rulers: number[];
|
|
readonly ariaLabel: string;
|
|
readonly ariaLabel: string;
|
|
@@ -1503,6 +1514,7 @@ declare module monaco.editor {
|
|
export interface IViewConfigurationChangedEvent {
|
|
export interface IViewConfigurationChangedEvent {
|
|
readonly theme: boolean;
|
|
readonly theme: boolean;
|
|
readonly canUseTranslate3d: boolean;
|
|
readonly canUseTranslate3d: boolean;
|
|
|
|
+ readonly disableMonospaceOptimizations: boolean;
|
|
readonly experimentalScreenReader: boolean;
|
|
readonly experimentalScreenReader: boolean;
|
|
readonly rulers: boolean;
|
|
readonly rulers: boolean;
|
|
readonly ariaLabel: boolean;
|
|
readonly ariaLabel: boolean;
|
|
@@ -1538,6 +1550,7 @@ declare module monaco.editor {
|
|
readonly parameterHints: boolean;
|
|
readonly parameterHints: boolean;
|
|
readonly iconsInSuggestions: boolean;
|
|
readonly iconsInSuggestions: boolean;
|
|
readonly formatOnType: boolean;
|
|
readonly formatOnType: boolean;
|
|
|
|
+ readonly formatOnPaste: boolean;
|
|
readonly suggestOnTriggerCharacters: boolean;
|
|
readonly suggestOnTriggerCharacters: boolean;
|
|
readonly acceptSuggestionOnEnter: boolean;
|
|
readonly acceptSuggestionOnEnter: boolean;
|
|
readonly acceptSuggestionOnCommitCharacter: boolean;
|
|
readonly acceptSuggestionOnCommitCharacter: boolean;
|
|
@@ -2794,10 +2807,18 @@ declare module monaco.editor {
|
|
* A label of the action that will be presented to the user.
|
|
* A label of the action that will be presented to the user.
|
|
*/
|
|
*/
|
|
label: string;
|
|
label: string;
|
|
|
|
+ /**
|
|
|
|
+ * Precondition rule.
|
|
|
|
+ */
|
|
|
|
+ precondition?: string;
|
|
/**
|
|
/**
|
|
* An array of keybindings for the action.
|
|
* An array of keybindings for the action.
|
|
*/
|
|
*/
|
|
keybindings?: number[];
|
|
keybindings?: number[];
|
|
|
|
+ /**
|
|
|
|
+ * The keybinding rule (condition on top of precondition).
|
|
|
|
+ */
|
|
|
|
+ keybindingContext?: string;
|
|
/**
|
|
/**
|
|
* Control if the action should show up in the context menu and where.
|
|
* Control if the action should show up in the context menu and where.
|
|
* The context menu of the editor has these default:
|
|
* The context menu of the editor has these default:
|
|
@@ -2812,10 +2833,6 @@ declare module monaco.editor {
|
|
* Control the order in the context menu group.
|
|
* Control the order in the context menu group.
|
|
*/
|
|
*/
|
|
contextMenuOrder?: number;
|
|
contextMenuOrder?: number;
|
|
- /**
|
|
|
|
- * The keybinding rule.
|
|
|
|
- */
|
|
|
|
- keybindingContext?: string;
|
|
|
|
/**
|
|
/**
|
|
* Method that will be executed when the action is triggered.
|
|
* Method that will be executed when the action is triggered.
|
|
* @param editor The editor instance is passed in as a convinience
|
|
* @param editor The editor instance is passed in as a convinience
|
|
@@ -3006,6 +3023,10 @@ declare module monaco.editor {
|
|
* Scroll vertically or horizontally as necessary and reveal a range centered vertically.
|
|
* Scroll vertically or horizontally as necessary and reveal a range centered vertically.
|
|
*/
|
|
*/
|
|
revealRangeInCenter(range: IRange): void;
|
|
revealRangeInCenter(range: IRange): void;
|
|
|
|
+ /**
|
|
|
|
+ * Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.
|
|
|
|
+ */
|
|
|
|
+ revealRangeAtTop(range: IRange): void;
|
|
/**
|
|
/**
|
|
* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
|
|
* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
|
|
*/
|
|
*/
|
|
@@ -3932,9 +3953,9 @@ declare module monaco.languages {
|
|
export function registerDefinitionProvider(languageId: string, provider: DefinitionProvider): IDisposable;
|
|
export function registerDefinitionProvider(languageId: string, provider: DefinitionProvider): IDisposable;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Register a type definition provider (used by e.g. go to implementation).
|
|
|
|
|
|
+ * Register a type implementation provider (used by e.g. go to implementation).
|
|
*/
|
|
*/
|
|
- export function registerTypeDefinitionProvider(languageId: string, provider: TypeDefinitionProvider): IDisposable;
|
|
|
|
|
|
+ export function registerImplementationProvider(languageId: string, provider: ImplementationProvider): IDisposable;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Register a code lens provider (used by e.g. inline code lenses).
|
|
* Register a code lens provider (used by e.g. inline code lenses).
|
|
@@ -4020,6 +4041,23 @@ declare module monaco.languages {
|
|
Folder = 18,
|
|
Folder = 18,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * A snippet string is a template which allows to insert text
|
|
|
|
+ * and to control the editor cursor when insertion happens.
|
|
|
|
+ *
|
|
|
|
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
|
|
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
|
|
+ * the end of the snippet. Variables are defined with `$name` and
|
|
|
|
+ * `${name:default value}`. The full snippet syntax is documented
|
|
|
|
+ * [here](http://code.visualstudio.com/docs/customization/userdefinedsnippets#_creating-your-own-snippets).
|
|
|
|
+ */
|
|
|
|
+ export interface SnippetString {
|
|
|
|
+ /**
|
|
|
|
+ * The snippet string.
|
|
|
|
+ */
|
|
|
|
+ value: string;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* A completion item represents a text snippet that is
|
|
* A completion item represents a text snippet that is
|
|
* proposed to complete text that is being typed.
|
|
* proposed to complete text that is being typed.
|
|
@@ -4058,18 +4096,30 @@ declare module monaco.languages {
|
|
*/
|
|
*/
|
|
filterText?: string;
|
|
filterText?: string;
|
|
/**
|
|
/**
|
|
- * A string that should be inserted in a document when selecting
|
|
|
|
|
|
+ * A string or snippet that should be inserted in a document when selecting
|
|
* this completion. When `falsy` the [label](#CompletionItem.label)
|
|
* this completion. When `falsy` the [label](#CompletionItem.label)
|
|
* is used.
|
|
* is used.
|
|
*/
|
|
*/
|
|
- insertText?: string;
|
|
|
|
|
|
+ insertText?: string | SnippetString;
|
|
/**
|
|
/**
|
|
- * An [edit](#TextEdit) which is applied to a document when selecting
|
|
|
|
|
|
+ * A range of text that should be replaced by this completion item.
|
|
|
|
+ *
|
|
|
|
+ * Defaults to a range from the start of the [current word](#TextDocument.getWordRangeAtPosition) to the
|
|
|
|
+ * current position.
|
|
|
|
+ *
|
|
|
|
+ * *Note:* The range must be a [single line](#Range.isSingleLine) and it must
|
|
|
|
+ * [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
|
|
|
+ */
|
|
|
|
+ range?: Range;
|
|
|
|
+ /**
|
|
|
|
+ * @deprecated **Deprecated** in favor of `CompletionItem.insertText` and `CompletionItem.range`.
|
|
|
|
+ *
|
|
|
|
+ * ~~An [edit](#TextEdit) which is applied to a document when selecting
|
|
* this completion. When an edit is provided the value of
|
|
* this completion. When an edit is provided the value of
|
|
- * [insertText](#CompletionItem.insertText) is ignored.
|
|
|
|
|
|
+ * [insertText](#CompletionItem.insertText) is ignored.~~
|
|
*
|
|
*
|
|
- * The [range](#Range) of the edit must be single-line and one the same
|
|
|
|
- * line completions where [requested](#CompletionItemProvider.provideCompletionItems) at.
|
|
|
|
|
|
+ * ~~The [range](#Range) of the edit must be single-line and on the same
|
|
|
|
+ * line completions were [requested](#CompletionItemProvider.provideCompletionItems) at.~~
|
|
*/
|
|
*/
|
|
textEdit?: editor.ISingleEditOperation;
|
|
textEdit?: editor.ISingleEditOperation;
|
|
}
|
|
}
|
|
@@ -4284,6 +4334,10 @@ declare module monaco.languages {
|
|
* Describe what to do with the indentation.
|
|
* Describe what to do with the indentation.
|
|
*/
|
|
*/
|
|
indentAction: IndentAction;
|
|
indentAction: IndentAction;
|
|
|
|
+ /**
|
|
|
|
+ * Describe whether to outdent current line.
|
|
|
|
+ */
|
|
|
|
+ outdentCurrentLine?: boolean;
|
|
/**
|
|
/**
|
|
* Describes text to be appended after the new line and after the indentation.
|
|
* Describes text to be appended after the new line and after the indentation.
|
|
*/
|
|
*/
|
|
@@ -4519,11 +4573,11 @@ declare module monaco.languages {
|
|
* The type definition provider interface defines the contract between extensions and
|
|
* The type definition provider interface defines the contract between extensions and
|
|
* the go to implementation feature.
|
|
* the go to implementation feature.
|
|
*/
|
|
*/
|
|
- export interface TypeDefinitionProvider {
|
|
|
|
|
|
+ export interface ImplementationProvider {
|
|
/**
|
|
/**
|
|
* Provide the implementation of the symbol at the given position and document.
|
|
* Provide the implementation of the symbol at the given position and document.
|
|
*/
|
|
*/
|
|
- provideTypeDefinition(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): Definition | Thenable<Definition>;
|
|
|
|
|
|
+ provideImplementation(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): Definition | Thenable<Definition>;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -5074,12 +5128,14 @@ declare module monaco.languages.html {
|
|
readonly insertSpaces: boolean;
|
|
readonly insertSpaces: boolean;
|
|
readonly wrapLineLength: number;
|
|
readonly wrapLineLength: number;
|
|
readonly unformatted: string;
|
|
readonly unformatted: string;
|
|
|
|
+ readonly contentUnformatted: string;
|
|
readonly indentInnerHtml: boolean;
|
|
readonly indentInnerHtml: boolean;
|
|
readonly preserveNewLines: boolean;
|
|
readonly preserveNewLines: boolean;
|
|
readonly maxPreserveNewLines: number;
|
|
readonly maxPreserveNewLines: number;
|
|
readonly indentHandlebars: boolean;
|
|
readonly indentHandlebars: boolean;
|
|
readonly endWithNewline: boolean;
|
|
readonly endWithNewline: boolean;
|
|
readonly extraLiners: string;
|
|
readonly extraLiners: string;
|
|
|
|
+ readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
|
}
|
|
}
|
|
|
|
|
|
export interface CompletionConfiguration {
|
|
export interface CompletionConfiguration {
|