Fixes a regression in monaco-css.
Fixes a few regressions.
Contributions to monaco-html
:
Contributions to monaco-languages
:
Contributions to monaco-typescript
:
Paste
in the context menu in browsers which support the clipboard API.monaco-typescript
: support for "deprecated" tags, API to participate in the web worker, improved lib.d.ts resolving.overflowWidgetsDomNode
constructor option to pass in a parent for overflowing widgets.minimap.size
option: proportional
, fill
, fit
.OnTypeRename
provider and option renameOnType
.automaticLayout
.tabIndex
, scrollPredominantAxis
, columnSelection
, padding
, unfoldOnClickAfterEndOfLine
, renderLineHighlightOnlyWhenFocus
, definitionLinkOpensInPeek
, showDeprecated
, comments.ignoreEmptyLines
, find.cursorMoveOnType
, find.loop
.originalCodeLens
, modifiedCodeLens
.rulers
can now define different colors, renderWhitespace
can now be trailing
.CompletionItemLabel.signature
has been renamed to CompletionItemLabel.parameters
.CompletionItemProvider.resolveCompletionItem
has changed.IMarker.code.link
was renamed to IMarker.code.target
.IMarkerData.code.link
was renamed to IMarkerData.code.target
.EditorLayoutInfo
has been restructured.Contributions to monaco-editor
:
Contributions to monaco-typescript
:
Contributions to monaco-json
:
Contributions to monaco-languages
:
renderValidationDecorations
- render validation decorations even in read only editorswrappingStrategy
- delegate wrapping points computation to the browsercomments.insertSpace
- insert a space around comments when running commenting commandsfoldingHighlight
- highlight folded regionspeekWidgetDefaultFocus
- focus the inline editor or the tree when opening peek viewonCompositionStart
, onCompositionEnd
to onDidCompositionStart
, onDidCompositionEnd
onDidPaste
WorkspaceEdit.edits
has now changed its shape such that edits must no longer be grouped by resource.Contributions to monaco-editor
:
Contributions to monaco-typescript
:
Contributions to monaco-languages
:
Contributions to monaco-editor
:
Contributions to monaco-languages
:
autoIndent
- #1726wordBasedSuggestions
) - #1746Contributions to monaco-editor
:
Contributions to monaco-languages
:
dimension
in the editor construction options in order to avoid a synchronous layout.multiCursorPaste
: define how to distribute paste in case of multi-cursormatchBrackets
: control if enclosing brackets should be highlightedgetConfiguration()
is replaced by getRawOptions()
, which returns the passed in editor options.Contributions to monaco-editor
:
Contributions to monaco-editor-webpack-plugin
:
Contributions to monaco-languages
:
Contributions to monaco-typescript
:
Contributions to monaco-editor
:
Contributions to monaco-json
:
Contributions to monaco-languages
:
Contributions to monaco-typescript
:
monaco.languages.typescript.typeScriptVersion
PR #31IModelDecorationOptions.minimap
, once set the decoration will be rendered in the minimapautoClosingOvertype
: it controls whether the editor allows typing over closing quotes or brackets.cursorSurroundingLines
: it controls how many visible lines to display around the cursor while moving the cursor towards beginning or end of a file.renderWhitespace: "selection"
: the editor can render whitespaces only in selection.DeclarationProvider
: The declaration provider interface defines the contract between extensions and the go to declaration feature.SelectionRangeProvider
Provide smart selection ranges for the given positions, see VS Code issue.CodeLensList
instead of ICodeLensSymbol[]
.DocumentSymbol
has a new property tags
to support more types.string
instead of number
.Contributions to monaco-json
:
LinkProvider.ProvideLinks
should now return ILinksList
instead of ILink[]
.IEditorOptions.iconsInSuggestions
and EditorContribOptions.iconsInSuggestions
are now replaced by EditorContribOptions.suggest.showIcons
.EditorContribOptions.suggest.maxVisibleSuggestions
to control maximum suggestions to show in suggestions widget.EditorContribOptions.suggest.filteredTypes
is now introduced to allow suggestions to be filtered by the user. For more details, please read vscode#45039.Contributions to monaco-editor
:
monaco.editor.remeasureFonts
) in case custom fonts are used and the editor is painted at a time when the fonts are not finished loading.renderFinalNewline
, or to have a cursorSmoothCaretAnimation
CompletionItem.range
is now mandatory. Most times, you can use model.getWordUntilPosition()
to get a good range.DefinitionLink
has been renamed to LocationLink
and a couple of its fields have also been renamed.Contributions to monaco-editor
:
Contributions to monaco-languages
:
Contributions to monaco-typescript
:
marked
to allow for packaging with rollup (https://github.com/Microsoft/monaco-editor/issues/1183)/esm/
distribution (https://github.com/Microsoft/monaco-editor/issues/1178)monaco.d.ts
to better reflect null types.monaco.Promise
API has been reduced to indicate that. We are setting up a Promise polyfill to cover browsers which do not have a native Promise implementation yet (i.e. IE11).CompletionItemProvider.provideCompletionItems
and CompletionItemProvider.resolveCompletionItem
have been modified to better reflect the API of VS Code. Both arguments and return type have changed.SignatureHelpProvider.provideSignatureHelp
now receives an extra argument for the context.parameterHints
, autoClosingBrackets
, autoClosingQuotes
, autoSurround
, copyWithSyntaxHighlighting
, tabCompletion
.Contributions to monaco-editor
:
Contributions to monaco-languages
:
Contributions to monaco-typescript
:
Contributions to monaco-json
:
Contributions to monaco-css
:
typescriptServices
is no longer loaded on the UI thread, this helps with webpack's bundle output size.scrollBeyondLastColumn
, hover
, suggest
, highlightActiveIndentGuide
, showUnused
.setTokensProvider
with EncodedTokensProvider
.monaco.languages.getEncodedLanguageId
to get the numeric language id.DefinitionProvider.provideDefinition
, ImplementationProvider.provideImplementation
, TypeDefinitionProvider.provideTypeDefinition
can now return a DefinitionLink
.Severity
.IEditor.isFocused
to IEditor.hasTextFocus
.ICodeEditor.onDidFocusEditor
to ICodeEditor.onDidFocusEditorWidget
.ICodeEditor.onDidBlurEditor
to ICodeEditor.onDidBlurEditorWidget
.DocumentSymbolProvider.provideDocumentSymbols
must now return DocumentSymbol[]
.Contributions to monaco-editor
:
Contributions to monaco-typescript
:
file
fields of relatedInformation
too. (WIP) PR #21Contributions to monaco-languages
:
registerFoldingRangeProvider
.IModelDecorationOptions.zIndex
. A decoration with greater stack order is always in front of a decoration with a lower stack order.inlineClassName
which affects letter spacing. the stack order of a decoration by setting IModelDecorationOptions.inlineClassNameAffectsLetterSpacing
.ITextModel.getLineLength(lineNumber: number)
)codeActionsOnSave
, controls whether code action kinds will be run on save.codeActionsOnSaveTimeout
, controls timeout for running code actions on save.multiCursorMergeOverlapping
, controls if overlapping selections should be merged. Default to true
.ICodeEditor.getCenteredRangeInViewport
.RenameProvider.resolveRenameLocation
now returns RenameLocation
instead of IRange
.monaco-editor-webpack-plugin
- now available on npm.MarkerSeverity
instead of Severity
for markers serverity.RenameProvider.resolveInitialRenameValue
with RenameProvider.resolveRenameLocation
.monaco-typescript
, renamed setMaximunWorkerIdleTime
to setMaximumWorkerIdleTime
.fromMarkdownString
PR monaco-json#4editor.api.d.ts
typingsDocumentColorProvider
.MarkedString
with IMarkdownString
. Source code snippets can be expressed using the GH markdown syntax.IResourceEdit
to ResourceTextEdit
.IModel
, IReadOnlyModel
, IEditableTextModel
, ITextModelWithMarkers
, ITokenizedModel
, ITextModelWithDecorations
to ITextModel
. A type alias for IModel
is defined for compatibility.ICommonCodeEditor
and ICodeEditor
to ICodeEditor
.ICommonDiffEditor
and IDiffEditor
to IDiffEditor
.CompletionItem.documentation
, ParameterInformation.documentation
and SignatureInformation.documentation
can now be an IMarkdownString
.CompetionItem.command
, CompletionItem.commitCharacters
and CompletionItem.additionalTextEdits
.folding
which can define markers for code patterns where a folding regions should be created. See for example the Python configuration.ResourceFileEdit
(due to how monaco.d.ts
is generated from vscode). That is not honoured by the editor, and should not be used.CodeAction
.provideCodeActions
in CodeActionProvider
now returns Command[] | Thenable<Command[]>
instead of CodeAction[] | Thenable<CodeAction[]>
, which is already removed.monaco.editor.getModelMarkers
. Get markers for owner and/or resource..row
for command palette to avoid CSS conflicts with Bootstrap.editor.minimap
to disable it).editor.dragAndDrop
to disable it).editor.updateOptions()
no longer accepts theme
; the theme can be changed via the newly introduced monaco.editor.setTheme()
. Additionally, we recommend editor colors be customized via monaco.editor.defineTheme()
instead of via CSS -- see sample. The color names will be stable, while the CSS class names might break at any time.IModel.findMatches
to accept a list of word separators.IModelContentChangedEvent
emitted via IModel.onDidChangeContent
to now contain a batch of all the changes that the model had.transform: translate3d
, now using will-change: transform
for browser layer hinting. Use the disableLayerHinting
option if you have any trouble with browser layers (blurriness or high GPU memory usage).wordWrap
, wordWrapColumn
and wordWrapMinified
.monaco.languages.registerTypeDefinitionProvider
.accessibilityHelpUrl
- the url of a page to open for documentation about how to operate the editor when using a Screen Reader.find.seedSearchStringFromSelection
- Ctrl+F/Cmd+F seeds search string from the editor selection.find.autoFindInSelection
- Ctrl+F/Cmd+F turns on the find in selection toggle if the editor selection is multiline.minimap.enabled
- enable minimap.minimap.showSlider
- control when to render the minimap slider.minimap.renderCharacters
- render characters or blocks in the minimap.minimap.maxColumn
- maximum number of columns the minimap shows.overviewRulerBorder
- toggle that the overview ruler renders a border.links
- enable link detection.multiCursorModifier
- change the multi cursor modifier key.accessibilitySupport
- optimize the editor for use with a Screen Reader.autoIndent
- automatically fix indentation when moving lines, pasting or typing.dragAndDrop
- dragging and dropping editor selection within the editor.occurrencesHighlight
- enable highlighting of occurences.showFoldingControls
- fine-tune when the folding icons should showmatchBrackets
- enable bracket matchingletterSpacing
- configure font's letter-spacing.vscode
which have also made their way into the monaco-editor
.Intl
missing.disableMonospaceOptimizations
editor option that can be used in case browser zooming exposes additional issues.formatOnPaste
editor option.IActionDescriptor.precondition
.registerTypeDefinitionProvider
to registerImplementationProvider
and associated types.monaco-typescript
(JS and TS language support).nextEmbedded
), the state ending up in must immediately contain a nextEmbedded: "@pop"
rule. This helps in quickly figuring out where the embedded mode should be left. The editor will throw an error if the Monarch grammar does not respect this condition.span
node of text, and CSS rules would match token types and assign styling to them (i.e. color, boldness, etc.to style tokens)monaco.editor.defineTheme()
and the playground contains a sample showing how that works.F1
> Developer: Inspect tokens
. This will bring up a widget showing the token type and the applied styles.monaco.editor.onDidCreateEditor
that will be fired whenever an editor is created (will fire even for a diff editor, with the two editors that a diff editor consists of).monaco.editor.tokenize
that returns logical tokens (before theme matching, as opposed to monaco.editor.colorize
).monaco.languages.registerTypeDefinitionProvider
IModel.getMode()
.IModelLanguageChangedEvent
, IModelDecorationsChangedEvent
and IModelTokensChangedEvent
;IModel.findMatches
, IModel.findNextMatch
and IModel.findPreviousMatch
to be able to capture matches while searching.ICodeEditor.addAction
and IDiffEditor.addAction
now return an IDisposable
to be able to remove a previously added action.ICodeEditor.onDidChangeModelMode
to ICodeEditor.onDidChangeModelLanguage
;ICodeEditor.executeEdits
can now take resulting selection for better undo/redo stack management;ICodeEditor.getTargetAtClientPoint(clientX, clientY)
to be able to do hit testing.IViewZone.marginDomNode
to be able to insert a dom node in the margin side of a view zone.lineDecorationsWidth
can now take a value in the form of "1.2ch"
besides the previous accepted number (in px)renderLineHighlight
can now take a value in the set 'none' | 'gutter' | 'line' | 'all'
.fixedOverflowWidgets
to render overflowing content widgets as 'fixed'
(defaults to false)acceptSuggestionOnCommitCharacter
to accept suggestions on provider defined characters (defaults to true)emptySelectionClipboard
- copying without a selection copies the current line (defaults to true)suggestFontSize
- the font size for the suggest widgetsuggestLineHeight
- the line height for the suggest widgetrenderIndicators
- Render +/- indicators for added/deleted changes. (defaults to true)monaco.d.ts
).editor.addAction()
and have the action show in the context menu.lineNumbers
: 'on' | 'off' | 'relative'
renderWhitespace
: 'none' | 'boundary' | 'all'
model.setMode()
, as IMode
will soon disappear from the API.monaco-editor-core
:
monaco-editor-core
is now finally language agnostic.monaco-languages
.monaco-html
.monaco-editor-core
, we could improve the bundling and reduce the number of .js files we ship.editor.addCommand
was no longer working.monaco.d.ts
is generated by TypeScript 1.8.javascript
and typescript
language services:
extraLibs
.css
, less
, scss
and json
language services.mouseWheelZoom
, wordWrap
, snippetSuggestions
, tabCompletion
, wordBasedSuggestions
, renderControlCharacters
, renderLineHighlight
, fontWeight
.tabFocusMode
, outlineMarkers
.indentGuides
-> renderIndentGuides
, referenceInfos
-> codeLens
editor.pushUndoStop()
to explicitly push an undo stopsuppressMouseDown
to IContentWidget
resolveLink
to ILinkProvider
enablement
, contextMenuGroupId
from IActionDescriptor
monaco.editor.createWebWorker
now loads the AMD module and calls create
and passes in as first argument a context of type monaco.worker.IWorkerContext
and as second argument the initData
. This breaking change was needed to allow handling the case of misconfigured web workers (running on a file protocol or the cross-domain case)CodeActionProvider.provideCodeActions
now gets passed in a CodeActionContext
that contains the markers at the relevant range.hoverMessage
of a decoration is now a MarkedString | MarkedString[]
contents
of a Hover
returned by a HoverProvider
is now a MarkedString | MarkedString[]
IEditor.onDidChangeModelRawContent
, IModel.onDidChangeRawContent
file://
or misconfigured cross-domain loading) now load the web worker code in the UI thread. This caused a breaking change in the behaviour of monaco.editor.createWebWorker
position:fixed
element.