Align standalone editor CompletionItem

This commit is contained in:
Alex Dima 2018-03-08 12:17:05 +01:00
parent d0eaa02c0a
commit 3cde6c2f26
3 changed files with 16 additions and 15 deletions

View file

@ -1,7 +1,7 @@
{
"name": "monaco-editor-core",
"private": true,
"version": "0.11.0",
"version": "0.11.1",
"description": "A browser based code editor",
"author": "Microsoft Corporation",
"license": "MIT",

View file

@ -24,6 +24,7 @@ import { IMarkerData } from 'vs/platform/markers/common/markers';
import { Token, TokenizationResult, TokenizationResult2 } from 'vs/editor/common/core/token';
import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneThemeService';
import * as model from 'vs/editor/common/model';
import { IMarkdownString } from 'vs/base/common/htmlContent';
/**
* Register information about a new language.
@ -494,7 +495,7 @@ export interface CompletionItem {
/**
* A human-readable string that represents a doc-comment.
*/
documentation?: string;
documentation?: string | IMarkdownString;
/**
* A command that should be run upon acceptance of this item.
*/
@ -527,6 +528,12 @@ export interface CompletionItem {
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
*/
range?: Range;
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
* characters will be ignored.
*/
commitCharacters?: string[];
/**
* @deprecated **Deprecated** in favor of `CompletionItem.insertText` and `CompletionItem.range`.
*
@ -544,12 +551,6 @@ export interface CompletionItem {
* nor with themselves.
*/
additionalTextEdits?: model.ISingleEditOperation[];
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
* characters will be ignored.
*/
commitCharacters?: string[];
}
/**
* Represents a collection of [completion items](#CompletionItem) to be presented

14
src/vs/monaco.d.ts vendored
View file

@ -4171,7 +4171,7 @@ declare module monaco.languages {
/**
* A human-readable string that represents a doc-comment.
*/
documentation?: string;
documentation?: string | IMarkdownString;
/**
* A command that should be run upon acceptance of this item.
*/
@ -4204,6 +4204,12 @@ declare module monaco.languages {
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
*/
range?: Range;
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
* characters will be ignored.
*/
commitCharacters?: string[];
/**
* @deprecated **Deprecated** in favor of `CompletionItem.insertText` and `CompletionItem.range`.
*
@ -4221,12 +4227,6 @@ declare module monaco.languages {
* nor with themselves.
*/
additionalTextEdits?: editor.ISingleEditOperation[];
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
* characters will be ignored.
*/
commitCharacters?: string[];
}
/**