Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MonacoTextModelService

Hierarchy

  • MonacoTextModelService

Implements

  • ITextModelService

Index

Constructors

Properties

_models: ReferenceCollection<string, MonacoEditorModel> = ...
_serviceBrand: undefined
editorPreferences: EditorPreferences
factories: ContributionProvider<MonacoEditorModelFactory>
fileService: FileService
logger: ILogger
modelOptions: {} = ...

Type declaration

  • [name: string]: keyof ITextModelUpdateOptions | undefined
ready: Promise<void> = ...

This component does some asynchronous work before being fully initialized.

deprecated

since 1.25.0. Is instantly resolved.

resourceProvider: ResourceProvider

Accessors

Methods

  • canHandleResource(resource: Uri): boolean
  • getModelOptions(uri: string): ITextModelUpdateOptions
  • getModelOptions(model: MonacoEditorModel): ITextModelUpdateOptions
  • init(): void
  • registerTextModelContentProvider(scheme: string, provider: ITextModelContentProvider): IDisposable
  • toModelOption(editorPreference: "editor.tabSize" | "editor.insertSpaces" | "editor.detectIndentation" | "editor.trimAutoWhitespace" | "editor.largeFileOptimizations" | "editor.wordBasedSuggestions" | "editor.wordBasedSuggestionsMode" | "editor.semanticHighlighting.enabled" | "editor.stablePeek" | "editor.maxTokenizationLineLength" | "editor.language.brackets" | "editor.language.colorizedBracketPairs" | "diffEditor.maxComputationTime" | "diffEditor.maxFileSize" | "diffEditor.renderSideBySide" | "diffEditor.renderMarginRevertIcon" | "diffEditor.ignoreTrimWhitespace" | "diffEditor.renderIndicators" | "diffEditor.codeLens" | "diffEditor.wordWrap" | "diffEditor.diffAlgorithm" | "editor.acceptSuggestionOnCommitCharacter" | "editor.acceptSuggestionOnEnter" | "editor.accessibilitySupport" | "editor.accessibilityPageSize" | "editor.autoClosingBrackets" | "editor.autoClosingDelete" | "editor.autoClosingOvertype" | "editor.autoClosingQuotes" | "editor.autoIndent" | "editor.autoSurround" | "editor.bracketPairColorization.enabled" | "editor.bracketPairColorization.independentColorPoolPerBracketType" | "editor.guides.bracketPairs" | "editor.guides.bracketPairsHorizontal" | "editor.guides.highlightActiveBracketPair" | "editor.guides.indentation" | "editor.guides.highlightActiveIndentation" | "editor.codeLens" | "editor.codeLensFontFamily" | "editor.codeLensFontSize" | "editor.colorDecorators" | "editor.columnSelection" | "editor.comments.insertSpace" | "editor.comments.ignoreEmptyLines" | "editor.copyWithSyntaxHighlighting" | "editor.cursorBlinking" | "editor.cursorSmoothCaretAnimation" | "editor.cursorStyle" | "editor.cursorSurroundingLines" | "editor.cursorSurroundingLinesStyle" | "editor.cursorWidth" | "editor.dragAndDrop" | "editor.dropIntoEditor.enabled" | "editor.emptySelectionClipboard" | "editor.fastScrollSensitivity" | "editor.find.cursorMoveOnType" | "editor.find.seedSearchStringFromSelection" | "editor.find.autoFindInSelection" | "editor.find.addExtraSpaceOnTop" | "editor.find.loop" | "editor.folding" | "editor.foldingStrategy" | "editor.foldingHighlight" | "editor.foldingImportsByDefault" | "editor.foldingMaximumRegions" | "editor.unfoldOnClickAfterEndOfLine" | "editor.fontFamily" | "editor.fontLigatures" | "editor.fontSize" | "editor.fontWeight" | "editor.formatOnPaste" | "editor.formatOnType" | "editor.glyphMargin" | "editor.gotoLocation.multiple" | "editor.gotoLocation.multipleDefinitions" | "editor.gotoLocation.multipleTypeDefinitions" | "editor.gotoLocation.multipleDeclarations" | "editor.gotoLocation.multipleImplementations" | "editor.gotoLocation.multipleReferences" | "editor.gotoLocation.alternativeDefinitionCommand" | "editor.gotoLocation.alternativeTypeDefinitionCommand" | "editor.gotoLocation.alternativeDeclarationCommand" | "editor.gotoLocation.alternativeImplementationCommand" | "editor.gotoLocation.alternativeReferenceCommand" | "editor.hideCursorInOverviewRuler" | "editor.hover.enabled" | "editor.hover.delay" | "editor.hover.sticky" | "editor.hover.above" | "editor.inlineSuggest.enabled" | "editor.letterSpacing" | "editor.lightbulb.enabled" | "editor.lineHeight" | "editor.lineNumbers" | "editor.linkedEditing" | "editor.links" | "editor.matchBrackets" | "editor.minimap.enabled" | "editor.minimap.autohide" | "editor.minimap.size" | "editor.minimap.side" | "editor.minimap.showSlider" | "editor.minimap.scale" | "editor.minimap.renderCharacters" | "editor.minimap.maxColumn" | "editor.mouseWheelScrollSensitivity" | "editor.mouseWheelZoom" | "editor.multiCursorMergeOverlapping" | "editor.multiCursorModifier" | "editor.multiCursorPaste" | "editor.occurrencesHighlight" | "editor.overviewRulerBorder" | "editor.padding.top" | "editor.padding.bottom" | "editor.parameterHints.enabled" | "editor.parameterHints.cycle" | "editor.peekWidgetDefaultFocus" | "editor.definitionLinkOpensInPeek" | "editor.quickSuggestions" | "editor.quickSuggestionsDelay" | "editor.renameOnType" | "editor.renderControlCharacters" | "editor.renderFinalNewline" | "editor.renderLineHighlight" | "editor.renderLineHighlightOnlyWhenFocus" | "editor.renderWhitespace" | "editor.roundedSelection" | "editor.rulers" | "editor.scrollbar.vertical" | "editor.scrollbar.horizontal" | "editor.scrollbar.verticalScrollbarSize" | "editor.scrollbar.horizontalScrollbarSize" | "editor.scrollbar.scrollByPage" | "editor.scrollBeyondLastColumn" | "editor.scrollBeyondLastLine" | "editor.scrollPredominantAxis" | "editor.selectionClipboard" | "editor.selectionHighlight" | "editor.showFoldingControls" | "editor.showUnused" | "editor.snippetSuggestions" | "editor.smartSelect.selectLeadingAndTrailingWhitespace" | "editor.smoothScrolling" | "editor.stickyScroll.enabled" | "editor.stickyScroll.maxLineCount" | "editor.stickyTabStops" | "editor.suggest.insertMode" | "editor.suggest.filterGraceful" | "editor.suggest.localityBonus" | "editor.suggest.shareSuggestSelections" | "editor.suggest.snippetsPreventQuickSuggestions" | "editor.suggest.showIcons" | "editor.suggest.showStatusBar" | "editor.suggest.preview" | "editor.suggest.showInlineDetails" | "editor.suggest.maxVisibleSuggestions" | "editor.suggest.filteredTypes" | "editor.suggest.showMethods" | "editor.suggest.showFunctions" | "editor.suggest.showConstructors" | "editor.suggest.showDeprecated" | "editor.suggest.matchOnWordStartOnly" | "editor.suggest.showFields" | "editor.suggest.showVariables" | "editor.suggest.showClasses" | "editor.suggest.showStructs" | "editor.suggest.showInterfaces" | "editor.suggest.showModules" | "editor.suggest.showProperties" | "editor.suggest.showEvents" | "editor.suggest.showOperators" | "editor.suggest.showUnits" | "editor.suggest.showValues" | "editor.suggest.showConstants" | "editor.suggest.showEnums" | "editor.suggest.showEnumMembers" | "editor.suggest.showKeywords" | "editor.suggest.showWords" | "editor.suggest.showColors" | "editor.suggest.showFiles" | "editor.suggest.showReferences" | "editor.suggest.showCustomcolors" | "editor.suggest.showFolders" | "editor.suggest.showTypeParameters" | "editor.suggest.showSnippets" | "editor.suggest.showUsers" | "editor.suggest.showIssues" | "editor.suggestFontSize" | "editor.suggestLineHeight" | "editor.suggestOnTriggerCharacters" | "editor.suggestSelection" | "editor.tabCompletion" | "editor.unicodeHighlight.nonBasicASCII" | "editor.unicodeHighlight.invisibleCharacters" | "editor.unicodeHighlight.ambiguousCharacters" | "editor.unicodeHighlight.includeComments" | "editor.unicodeHighlight.includeStrings" | "editor.unicodeHighlight.allowedCharacters" | "editor.unicodeHighlight.allowedLocales" | "editor.unusualLineTerminators" | "editor.useTabStops" | "editor.wordSeparators" | "editor.wordWrap" | "editor.wordWrapColumn" | "editor.wrappingIndent" | "editor.wrappingStrategy" | "editor.showDeprecated" | "editor.inlayHints.enabled" | "editor.inlayHints.fontSize" | "editor.inlayHints.fontFamily" | "editor.inlayHints.padding" | "editor.codeActionWidget.showHeaders" | "editor.experimental.pasteActions.enabled" | "editor.rename.enablePreview" | "editor.find.globalFindClipboard" | "editor.codeActionsOnSave" | "editor.formatOnSave" | "editor.formatOnSaveMode" | "files.eol" | "files.autoSave" | "files.autoSaveDelay" | "files.refactoring.autoSave" | "editor.defaultFormatter" | "editor.formatOnSaveTimeout" | "editor.history.persistClosedEditors"): undefined | keyof ITextModelUpdateOptions
  • Parameters

    • editorPreference: "editor.tabSize" | "editor.insertSpaces" | "editor.detectIndentation" | "editor.trimAutoWhitespace" | "editor.largeFileOptimizations" | "editor.wordBasedSuggestions" | "editor.wordBasedSuggestionsMode" | "editor.semanticHighlighting.enabled" | "editor.stablePeek" | "editor.maxTokenizationLineLength" | "editor.language.brackets" | "editor.language.colorizedBracketPairs" | "diffEditor.maxComputationTime" | "diffEditor.maxFileSize" | "diffEditor.renderSideBySide" | "diffEditor.renderMarginRevertIcon" | "diffEditor.ignoreTrimWhitespace" | "diffEditor.renderIndicators" | "diffEditor.codeLens" | "diffEditor.wordWrap" | "diffEditor.diffAlgorithm" | "editor.acceptSuggestionOnCommitCharacter" | "editor.acceptSuggestionOnEnter" | "editor.accessibilitySupport" | "editor.accessibilityPageSize" | "editor.autoClosingBrackets" | "editor.autoClosingDelete" | "editor.autoClosingOvertype" | "editor.autoClosingQuotes" | "editor.autoIndent" | "editor.autoSurround" | "editor.bracketPairColorization.enabled" | "editor.bracketPairColorization.independentColorPoolPerBracketType" | "editor.guides.bracketPairs" | "editor.guides.bracketPairsHorizontal" | "editor.guides.highlightActiveBracketPair" | "editor.guides.indentation" | "editor.guides.highlightActiveIndentation" | "editor.codeLens" | "editor.codeLensFontFamily" | "editor.codeLensFontSize" | "editor.colorDecorators" | "editor.columnSelection" | "editor.comments.insertSpace" | "editor.comments.ignoreEmptyLines" | "editor.copyWithSyntaxHighlighting" | "editor.cursorBlinking" | "editor.cursorSmoothCaretAnimation" | "editor.cursorStyle" | "editor.cursorSurroundingLines" | "editor.cursorSurroundingLinesStyle" | "editor.cursorWidth" | "editor.dragAndDrop" | "editor.dropIntoEditor.enabled" | "editor.emptySelectionClipboard" | "editor.fastScrollSensitivity" | "editor.find.cursorMoveOnType" | "editor.find.seedSearchStringFromSelection" | "editor.find.autoFindInSelection" | "editor.find.addExtraSpaceOnTop" | "editor.find.loop" | "editor.folding" | "editor.foldingStrategy" | "editor.foldingHighlight" | "editor.foldingImportsByDefault" | "editor.foldingMaximumRegions" | "editor.unfoldOnClickAfterEndOfLine" | "editor.fontFamily" | "editor.fontLigatures" | "editor.fontSize" | "editor.fontWeight" | "editor.formatOnPaste" | "editor.formatOnType" | "editor.glyphMargin" | "editor.gotoLocation.multiple" | "editor.gotoLocation.multipleDefinitions" | "editor.gotoLocation.multipleTypeDefinitions" | "editor.gotoLocation.multipleDeclarations" | "editor.gotoLocation.multipleImplementations" | "editor.gotoLocation.multipleReferences" | "editor.gotoLocation.alternativeDefinitionCommand" | "editor.gotoLocation.alternativeTypeDefinitionCommand" | "editor.gotoLocation.alternativeDeclarationCommand" | "editor.gotoLocation.alternativeImplementationCommand" | "editor.gotoLocation.alternativeReferenceCommand" | "editor.hideCursorInOverviewRuler" | "editor.hover.enabled" | "editor.hover.delay" | "editor.hover.sticky" | "editor.hover.above" | "editor.inlineSuggest.enabled" | "editor.letterSpacing" | "editor.lightbulb.enabled" | "editor.lineHeight" | "editor.lineNumbers" | "editor.linkedEditing" | "editor.links" | "editor.matchBrackets" | "editor.minimap.enabled" | "editor.minimap.autohide" | "editor.minimap.size" | "editor.minimap.side" | "editor.minimap.showSlider" | "editor.minimap.scale" | "editor.minimap.renderCharacters" | "editor.minimap.maxColumn" | "editor.mouseWheelScrollSensitivity" | "editor.mouseWheelZoom" | "editor.multiCursorMergeOverlapping" | "editor.multiCursorModifier" | "editor.multiCursorPaste" | "editor.occurrencesHighlight" | "editor.overviewRulerBorder" | "editor.padding.top" | "editor.padding.bottom" | "editor.parameterHints.enabled" | "editor.parameterHints.cycle" | "editor.peekWidgetDefaultFocus" | "editor.definitionLinkOpensInPeek" | "editor.quickSuggestions" | "editor.quickSuggestionsDelay" | "editor.renameOnType" | "editor.renderControlCharacters" | "editor.renderFinalNewline" | "editor.renderLineHighlight" | "editor.renderLineHighlightOnlyWhenFocus" | "editor.renderWhitespace" | "editor.roundedSelection" | "editor.rulers" | "editor.scrollbar.vertical" | "editor.scrollbar.horizontal" | "editor.scrollbar.verticalScrollbarSize" | "editor.scrollbar.horizontalScrollbarSize" | "editor.scrollbar.scrollByPage" | "editor.scrollBeyondLastColumn" | "editor.scrollBeyondLastLine" | "editor.scrollPredominantAxis" | "editor.selectionClipboard" | "editor.selectionHighlight" | "editor.showFoldingControls" | "editor.showUnused" | "editor.snippetSuggestions" | "editor.smartSelect.selectLeadingAndTrailingWhitespace" | "editor.smoothScrolling" | "editor.stickyScroll.enabled" | "editor.stickyScroll.maxLineCount" | "editor.stickyTabStops" | "editor.suggest.insertMode" | "editor.suggest.filterGraceful" | "editor.suggest.localityBonus" | "editor.suggest.shareSuggestSelections" | "editor.suggest.snippetsPreventQuickSuggestions" | "editor.suggest.showIcons" | "editor.suggest.showStatusBar" | "editor.suggest.preview" | "editor.suggest.showInlineDetails" | "editor.suggest.maxVisibleSuggestions" | "editor.suggest.filteredTypes" | "editor.suggest.showMethods" | "editor.suggest.showFunctions" | "editor.suggest.showConstructors" | "editor.suggest.showDeprecated" | "editor.suggest.matchOnWordStartOnly" | "editor.suggest.showFields" | "editor.suggest.showVariables" | "editor.suggest.showClasses" | "editor.suggest.showStructs" | "editor.suggest.showInterfaces" | "editor.suggest.showModules" | "editor.suggest.showProperties" | "editor.suggest.showEvents" | "editor.suggest.showOperators" | "editor.suggest.showUnits" | "editor.suggest.showValues" | "editor.suggest.showConstants" | "editor.suggest.showEnums" | "editor.suggest.showEnumMembers" | "editor.suggest.showKeywords" | "editor.suggest.showWords" | "editor.suggest.showColors" | "editor.suggest.showFiles" | "editor.suggest.showReferences" | "editor.suggest.showCustomcolors" | "editor.suggest.showFolders" | "editor.suggest.showTypeParameters" | "editor.suggest.showSnippets" | "editor.suggest.showUsers" | "editor.suggest.showIssues" | "editor.suggestFontSize" | "editor.suggestLineHeight" | "editor.suggestOnTriggerCharacters" | "editor.suggestSelection" | "editor.tabCompletion" | "editor.unicodeHighlight.nonBasicASCII" | "editor.unicodeHighlight.invisibleCharacters" | "editor.unicodeHighlight.ambiguousCharacters" | "editor.unicodeHighlight.includeComments" | "editor.unicodeHighlight.includeStrings" | "editor.unicodeHighlight.allowedCharacters" | "editor.unicodeHighlight.allowedLocales" | "editor.unusualLineTerminators" | "editor.useTabStops" | "editor.wordSeparators" | "editor.wordWrap" | "editor.wordWrapColumn" | "editor.wrappingIndent" | "editor.wrappingStrategy" | "editor.showDeprecated" | "editor.inlayHints.enabled" | "editor.inlayHints.fontSize" | "editor.inlayHints.fontFamily" | "editor.inlayHints.padding" | "editor.codeActionWidget.showHeaders" | "editor.experimental.pasteActions.enabled" | "editor.rename.enablePreview" | "editor.find.globalFindClipboard" | "editor.codeActionsOnSave" | "editor.formatOnSave" | "editor.formatOnSaveMode" | "files.eol" | "files.autoSave" | "files.autoSaveDelay" | "files.refactoring.autoSave" | "editor.defaultFormatter" | "editor.formatOnSaveTimeout" | "editor.history.persistClosedEditors"

    Returns undefined | keyof ITextModelUpdateOptions