Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
monaco-languageserver-types
Advanced tools
Convert between language server types and Monaco editor types
Convert between language server types and Monaco editor types.
fromCodeAction(codeAction)
fromCodeActionContext(codeActionContext)
fromCodeActionTriggerType(type)
fromCodeLens(codeLens)
fromColor(color)
fromColorInformation(colorInformation)
fromColorPresentation(colorPresentation)
fromCommand(command)
fromCompletionContext(completionContext)
fromCompletionItem(completionItem)
fromCompletionItemKind(kind)
fromCompletionItemTag(tag)
fromCompletionList(completionList)
fromCompletionTriggerKind(kind)
fromDefinition(definition)
fromDocumentHighlight(documentHighlight)
fromDocumentHighlightKind(kind)
fromDocumentSymbol(documentSymbol)
fromFoldingRange(foldingRange)
fromFormattingOptions(formattingOptions)
fromHover(hover)
fromInlayHint(inlayHint)
fromInlayHintKind(inlayHintKind)
fromInlayHintLabelPart(inlayHintLabelPart)
fromLink(link)
fromLinkedEditingRanges(linkedEditingRanges)
fromLocation(location)
fromLocationLink(locationLink)
fromMarkdownString(markdownString)
fromMarkerData(markerData)
fromMarkerSeverity(severity)
fromMarkerTag(tag)
fromParameterInformation(parameterInformation)
fromPosition(position)
fromRange(range)
fromRelatedInformation(relatedInformation)
fromSelectionRange(selectionRange)
fromSemanticTokens(semanticTokens)
fromSemanticTokensEdit(semanticTokensEdit)
fromSemanticTokensEdits(semanticTokensEdits)
fromSignatureHelp(signatureHelp)
fromSignatureHelpContext(signatureHelpContext)
fromSignatureHelpTriggerKind(signatureHelpTriggerKind)
fromSignatureInformation(signatureInformation)
fromSingleEditOperation(singleEditOperation)
fromSymbolKind(symbolKind)
fromSymbolTag(symbolTag)
fromTextEdit(textEdit)
fromWorkspaceEdit(workspaceEdit)
fromWorkspaceFileEdit(workspaceFileEdit)
fromWorkspaceFileEditOptions(options)
toCodeAction(codeAction)
toCodeActionContext(codeActionContext)
toCodeActionTriggerType(kind)
toCodeLens(codeLens)
toColor(color)
toColorInformation(colorInformation)
toColorPresentation(colorPresentation)
toCommand(command)
toCompletionContext(completionContext)
toCompletionItem(completionItem, options)
toCompletionItemKind(kind)
toCompletionItemTag(tag)
toCompletionList(completionList, options)
toCompletionTriggerKind(kind)
toDefinition(definition)
toDocumentHighlight(documentHighlight)
toDocumentHighlightKind(kind)
toDocumentSymbol(documentSymbol)
toFoldingRange(foldingRange)
toFormattingOptions(formattingOptions)
toHover(hover)
toInlayHint(inlayHint)
toInlayHintKind(inlayHintKind)
toInlayHintLabelPart(inlayHintLabelPart)
toLink(documentLink)
toLinkedEditingRanges(linkedEditingRanges)
toLocation(location)
toLocationLink(locationLink)
toMarkdownString(markupContent)
toMarkerData(diagnostic)
toMarkerSeverity(severity)
toMarkerTag(tag)
toParameterInformation(parameterInformation)
toPosition(position)
toRange(range)
toRelatedInformation(relatedInformation)
toSelectionRange(selectionRange)
toSemanticTokens(semanticTokens)
toSemanticTokensEdit(semanticTokensEdit)
toSemanticTokensEdits(semanticTokensDelta)
toSignatureHelp(signatureHelp)
toSignatureHelpContext(signatureHelpContext)
toSignatureHelpTriggerKind(signatureHelpTriggerKind)
toSignatureInformation(signatureInformation)
toSingleEditOperation(textEdit)
toSymbolKind(symbolKind)
toSymbolTag(symbolTag)
toTextEdit(textEdit)
toWorkspaceEdit(workspaceEdit)
toWorkspaceFileEdit(workspaceFileEdit)
toWorkspaceFileEditOptions(options)
npm install monaco-languageserver-types
This package exports function to convert language server types to Monaco editor types and vise
versa. It does so without importing monaco-editor
or vscode-languageserver-protocol
.
For each Monaco editor / language server type, there are two functions:
from*
converts a value from a Monaco editor type to a language server type.to*
converts a value from a language server type to a Monaco editor type.For example:
import type * as monaco from 'monaco-editor'
import { fromRange, toRange } from 'monaco-languageserver-types'
const monacoRange: monaco.IRange = {
startLineNumber: 1,
startColumn: 2,
endLineNumber: 3,
endColumn: 4
}
const lsRange = fromRange(monacoRange)
// { start: { line: 0, column: 1 }, end: { line: 2, column: 3 } }
console.log(toRange(lsRange))
// { startLineNumber: 1, startColumn: 2, endLineNumber: 3, endColumn: 4 }
fromCodeAction(codeAction)
Convert a Monaco editor code action to an LSP code action.
codeAction
(monaco.languages.CodeAction
) — the Monaco code action to convertThe code action as an LSP code action (lsp.CodeAction
).
fromCodeActionContext(codeActionContext)
Convert a Monaco editor code action context to an LSP code action context.
codeActionContext
(monaco.languages.CodeActionContext
) — the Monaco code action context to
convertThe code action context as an LSP code action context (lsp.CodeActionContext
).
fromCodeActionTriggerType(type)
Convert a Monaco editor code action trigger type to an LSP completion item kind.
type
(monaco.languages.CodeActionTriggerType
) — the Monaco code action trigger type to convertThe code action trigger type as an LSP completion item kind (lsp.CodeActionTriggerKind
).
fromCodeLens(codeLens)
Convert a Monaco editor code lens to an LSP code lens.
codeLens
(monaco.languages.CodeLens
) — the Monaco code lens to convertThe code lens as an LSP code lens (lsp.CodeLens
).
fromColor(color)
Convert a Monaco editor color to an LSP color.
color
(monaco.languages.IColor
) — the Monaco color to convertThe color as an LSP color (lsp.Color
).
fromColorInformation(colorInformation)
Convert a Monaco editor color information to an LSP color information.
colorInformation
(monaco.languages.IColorInformation
) — the Monaco color information to
convertThe color information as an LSP color information (lsp.ColorInformation
).
fromColorPresentation(colorPresentation)
Convert a Monaco editor color presentation to an LSP color presentation.
colorPresentation
(monaco.languages.IColorPresentation
) — the Monaco color presentation to
convertThe color presentation as an LSP color presentation (lsp.ColorPresentation
).
fromCommand(command)
Convert a Monaco editor command to an LSP command.
command
(monaco.languages.Command
) — the Monaco command to convertThe command as an LSP command (lsp.Command
).
fromCompletionContext(completionContext)
Convert a Monaco editor completion context to an LSP completion context.
completionContext
(monaco.languages.CompletionContext
) — the Monaco completion context to
convertThe completion context as an LSP completion context (lsp.CompletionContext
).
fromCompletionItem(completionItem)
Convert a Monaco editor completion item to an LSP completion item.
completionItem
(monaco.languages.CompletionItem
) — the Monaco completion item to convertThe completion item as an LSP completion item (lsp.CompletionItem
).
fromCompletionItemKind(kind)
Convert a Monaco editor completion item kind to an LSP completion item kind.
kind
(monaco.languages.CompletionItemKind
) — the Monaco completion item kind to convertThe completion item kind as an LSP completion item kind (lsp.CompletionItemKind | undefined
).
fromCompletionItemTag(tag)
Convert a Monaco editor completion item tag to an LSP completion item tag.
tag
(monaco.languages.CompletionItemTag
) — the Monaco completion item tag to convertThe completion item tag as an LSP completion item tag (lsp.CompletionItemTag
).
fromCompletionList(completionList)
Convert a Monaco editor completion list to an LSP completion list.
completionList
(monaco.languages.CompletionList
) — the Monaco completion list to convertThe completion list as an LSP completion list (lsp.CompletionList
).
fromCompletionTriggerKind(kind)
Convert a Monaco editor completion trigger kind to an LSP completion trigger kind.
kind
(monaco.languages.CompletionTriggerKind
) — the Monaco completion trigger kind to convertThe completion trigger kind as an LSP completion trigger kind (lsp.CompletionTriggerKind
).
fromDefinition(definition)
Convert a Monaco editor definition to an LSP definition.
definition
(monaco.languages.Definition
) — the Monaco definition to convertThe definition as an LSP definition (lsp.Definition
).
fromDocumentHighlight(documentHighlight)
Convert a Monaco editor document highlight to an LSP document highlight.
documentHighlight
(monaco.languages.DocumentHighlight
) — the Monaco document highlight to
convertThe document highlight as an LSP document highlight (lsp.DocumentHighlight
).
fromDocumentHighlightKind(kind)
Convert a Monaco editor document highlight kind to an LSP document highlight kind.
kind
(monaco.languages.DocumentHighlightKind
) — the Monaco document highlight kind to convertThe document highlight kind as an LSP document highlight kind (lsp.DocumentHighlightKind
).
fromDocumentSymbol(documentSymbol)
Convert a Monaco editor document symbol to an LSP document symbol.
documentSymbol
(monaco.languages.DocumentSymbol
) — the Monaco document symbol to convertThe document symbol as an LSP document symbol (lsp.DocumentSymbol
).
fromFoldingRange(foldingRange)
Convert a Monaco editor folding range to an LSP folding range.
foldingRange
(monaco.languages.FoldingRange
) — the Monaco folding range to convertThe folding range as an LSP folding range (lsp.FoldingRange
).
fromFormattingOptions(formattingOptions)
Convert a Monaco editor formatting options to an LSP formatting options.
formattingOptions
(monaco.languages.FormattingOptions
) — the Monaco formatting options to
convertThe formatting options as an LSP formatting options (lsp.FormattingOptions
).
fromHover(hover)
Convert a Monaco editor hover to an LSP hover.
hover
(monaco.languages.Hover
) — the Monaco hover to convertThe hover as an LSP hover (lsp.Hover
).
fromInlayHint(inlayHint)
Convert a Monaco editor inlay hint to an LSP inlay hint.
inlayHint
(monaco.languages.InlayHint
) — the Monaco inlay hint to convertThe inlay hint as an LSP inlay hint (lsp.InlayHint
).
fromInlayHintKind(inlayHintKind)
Convert a Monaco editor inlay hint kind to an LSP inlay hint kind.
inlayHintKind
(monaco.languages.InlayHintKind
) — the Monaco inlay hint kind to convertThe inlay hint kind as an LSP inlay hint kind (lsp.InlayHintKind
).
fromInlayHintLabelPart(inlayHintLabelPart)
Convert a Monaco editor inlay hint label part to an LSP inlay hint label part.
inlayHintLabelPart
(monaco.languages.InlayHintLabelPart
) — the Monaco inlay hint label part to
convertThe inlay hint label part as an LSP inlay hint label part (lsp.InlayHintPart
).
fromLink(link)
Convert a Monaco editor link to an LSP document link.
link
(monaco.languages.ILink
) — the Monaco link to convertThe link as an LSP document link (lsp.DocumentLink
).
fromLinkedEditingRanges(linkedEditingRanges)
Convert Monaco editor linked editing ranges to LSP linked editing ranges.
linkedEditingRanges
(monaco.languages.LinkedEditingRanges
) — the Monaco linked editing ranges
to convertThe linked editing ranges as LSP linked editing ranges (lsp.LinkedEditingRanges
).
fromLocation(location)
Convert a Monaco editor location to an LSP location.
location
(monaco.languages.Location
) — the Monaco location to convertThe location as an LSP location (lsp.Location
).
fromLocationLink(locationLink)
Convert a Monaco editor location link to an LSP location link.
locationLink
(monaco.languages.LocationLink
) — the Monaco location link to convertThe location link as an LSP location link (lsp.LocationLink
).
fromMarkdownString(markdownString)
Convert a Monaco editor markdown string to an LSP markup content.
markdownString
(monaco.IMarkdownString
) — the Monaco markdown string to convertThe markdown string as an LSP markup content (lsp.MarkupContent
).
fromMarkerData(markerData)
Convert a Monaco editor marker data to an LSP diagnostic.
markerData
(monaco.editor.IMarkerData
) — the Monaco marker data to convertThe marker data as an LSP diagnostic (lsp.Diagnostic
).
fromMarkerSeverity(severity)
Convert a Monaco editor marker severity to an LSP diagnostic severity.
severity
(monaco.MarkerSeverity
) — the Monaco marker severity to convertThe marker severity as an LSP diagnostic severity (lsp.DiagnosticSeverity
).
fromMarkerTag(tag)
Convert a Monaco editor marker tag to an LSP diagnostic tag.
tag
(monaco.MarkerTag
) — the Monaco marker tag to convertThe marker tag as an LSP diagnostic tag (lsp.DiagnosticTag
).
fromParameterInformation(parameterInformation)
Convert a Monaco editor parameter information to an LSP parameter information.
parameterInformation
(monaco.languages.ParameterInformation
) — the Monaco parameter
information to convertThe parameter information as an LSP parameter information (lsp.ParameterInformation
).
fromPosition(position)
Convert a Monaco editor position to an LSP range.
position
(monaco.IPosition
) — the Monaco position to convertThe position as an LSP position (lsp.Position
).
fromRange(range)
Convert a Monaco editor range to an LSP range.
range
(monaco.IRange
) — the Monaco range to convertThe range as an LSP range (lsp.Range
).
fromRelatedInformation(relatedInformation)
Convert a Monaco editor related information to an LSP diagnostic related information.
relatedInformation
(monaco.editor.IRelatedInformation
) — the Monaco related information to
convertThe related information as an LSP diagnostic related information
(lsp.DiagnosticRelatedInformation
).
fromSelectionRange(selectionRange)
Convert a Monaco editor selection range to an LSP selection range.
selectionRange
(monaco.languages.SelectionRange
) — the Monaco selection range to convertThe selection range as an LSP selection range (lsp.SelectionRange
).
fromSemanticTokens(semanticTokens)
Convert Monaco editor semantic tokens to LSP semantic tokens.
semanticTokens
(monaco.languages.SemanticTokens
) — the Monaco semantic tokens to convertThe semantic tokens as LSP semantic tokens (lsp.SemanticTokens
).
fromSemanticTokensEdit(semanticTokensEdit)
Convert Monaco editor semantic tokens to LSP semantic tokens.
semanticTokensEdit
(monaco.languages.SemanticTokensEdit
) — the Monaco semantic tokens to
convertThe semantic tokens as LSP semantic tokens (lsp.SemanticTokensEdit
).
fromSemanticTokensEdits(semanticTokensEdits)
Convert Monaco editsor semantic tokens edits to an LSP semantic tokens delta.
semanticTokensEdits
(monaco.languages.SemanticTokensEdits
) — the Monaco semantic tokens edits
to convertThe semantic tokens edits as an LSP semantic tokens delta (lsp.SemanticTokensDelta
).
fromSignatureHelp(signatureHelp)
Convert a Monaco editor signature help to an LSP signature help.
signatureHelp
(monaco.languages.SignatureHelp
) — the Monaco signature help to convertThe signature help as an LSP signature help (lsp.SignatureHelp
).
fromSignatureHelpContext(signatureHelpContext)
Convert a Monaco editor signature help context to an LSP signature help context.
signatureHelpContext
(monaco.languages.SignatureHelpContext
) — the Monaco signature help
context to convertThe signature help context as an LSP signature help context (lsp.SignatureHelpContext
).
fromSignatureHelpTriggerKind(signatureHelpTriggerKind)
Convert a Monaco editor signature help trigger kind to an LSP signature help trigger kind.
signatureHelpTriggerKind
(monaco.languages.SignatureHelpTriggerKind
) — the Monaco signature
help trigger kind to convertThe signature help trigger kind as an LSP signature help trigger kind
(lsp.SignatureHelpTriggerKind
).
fromSignatureInformation(signatureInformation)
Convert a Monaco editor signature information to an LSP signature information.
signatureInformation
(monaco.languages.SignatureInformation
) — the Monaco signature
information to convertThe signature information as an LSP signature information (lsp.SignatureInformation
).
fromSingleEditOperation(singleEditOperation)
Convert a Monaco editor single edit operation to an LSP text edit.
singleEditOperation
(monaco.editor.ISingleEditOperation
) — the Monaco single edit operation to
convertThe single edit operation as an LSP text edit (lsp.TextEdit
).
fromSymbolKind(symbolKind)
Convert a Monaco editor symbol kind to an LSP symbol kind.
symbolKind
(monaco.languages.SymbolKind
) — the Monaco symbol kind to convertThe symbol kind as an LSP symbol kind (lsp.SymbolKind
).
fromSymbolTag(symbolTag)
Convert a Monaco editor symbol tag to an LSP symbol tag.
symbolTag
(monaco.languages.SymbolTag
) — the Monaco symbol tag to convertThe symbol tag as an LSP symbol tag (lsp.SymbolTag
).
fromTextEdit(textEdit)
Convert a Monaco editor text edit to an LSP text edit.
textEdit
(monaco.languages.TextEdit
) — the Monaco text edit to convertThe text edit as an LSP text edit (lsp.TextEdit
).
fromWorkspaceEdit(workspaceEdit)
Convert a Monaco editor workspace edit to an LSP workspace edit.
workspaceEdit
(monaco.languages.WorkspaceEdit
) — the Monaco workspace edit to convertThe workspace edit as an LSP workspace edit (lsp.WorkspaceEdit
).
fromWorkspaceFileEdit(workspaceFileEdit)
Convert Monaco editor workspace file edit options to LSP workspace file edit options.
workspaceFileEdit
(monaco.languages.IWorkspaceFileEdit
) — the Monaco workspace file edit
options to convertThe range as LSP workspace file edit options (lsp.CreateFile | lsp.DeleteFile | lsp.RenameFile
).
fromWorkspaceFileEditOptions(options)
Convert Monaco editor workspace file edit options to LSP workspace file edit options.
options
(monaco.languages.WorkspaceFileEditOptions
) — the Monaco workspace file edit options
to convertThe range as LSP workspace file edit options
(lsp.CreateFileOptions & lsp.DeleteFileOptions & lsp.RenameFileOptions
).
toCodeAction(codeAction)
Convert an LSP code action to a Monaco editor code action.
codeAction
(lsp.CodeAction
) — the LSP code action to convertThe code action as Monaco editor code action (monaco.languages.CodeAction
).
toCodeActionContext(codeActionContext)
Convert an LSP code action context to a Monaco editor code action context.
codeActionContext
(lsp.CodeActionContext
) — the LSP code action context to convertThe code action context as Monaco editor code action context (monaco.languages.CodeActionContext
).
toCodeActionTriggerType(kind)
Convert an LSP completion item kind to a Monaco editor code action trigger type.
kind
(lsp.CodeActionTriggerType
) — the LSP completion item kind to convertThe completion item kind as Monaco editor code action trigger type
(monaco.languages.CodeActionTriggerType
).
toCodeLens(codeLens)
Convert an LSP code lens to a Monaco editor code lens.
codeLens
(lsp.CodeLens
) — the LSP code lens to convertThe code lens as Monaco editor code lens (monaco.languages.CodeLens
).
toColor(color)
Convert an LSP color to a Monaco editor color.
color
(lsp.Color
) — the LSP color to convertThe color as Monaco editor color (monaco.languages.IColor
).
toColorInformation(colorInformation)
Convert an LSP color information to a Monaco editor color information.
colorInformation
(lsp.ColorInformation
) — the LSP color information to convertThe color information as Monaco editor color information (monaco.languages.IColorInformation
).
toColorPresentation(colorPresentation)
Convert an LSP color presentation to a Monaco editor color presentation.
colorPresentation
(lsp.ColorPresentation
) — the LSP color presentation to convertThe color presentation as Monaco editor color presentation (monaco.languages.IColorPresentation
).
toCommand(command)
Convert an LSP command to a Monaco editor command.
command
(lsp.Command
) — the LSP command to convertThe command as Monaco editor command (monaco.languages.Command
).
toCompletionContext(completionContext)
Convert an LSP completion context to a Monaco editor completion context.
completionContext
(lsp.CompletionContext
) — the LSP completion context to convertThe completion context as Monaco editor completion context (monaco.languages.CompletionContext
).
toCompletionItem(completionItem, options)
Convert an LSP completion item to a Monaco editor completion item.
completionItem
(lsp.CompletionItem
) — the LSP completion item to convertoptions
(ToCompletionItemOptions
) — additional options needed to construct the Monaco
completion itemThe completion item as Monaco editor completion item (monaco.languages.CompletionItem
).
toCompletionItemKind(kind)
Convert an LSP completion item kind to a Monaco editor completion item kind.
kind
(lsp.CompletionItemKind
) — the LSP completion item kind to convertThe completion item kind as Monaco editor completion item kind
(monaco.languages.CompletionItemKind
).
toCompletionItemTag(tag)
Convert an LSP completion item tag to a Monaco editor completion item tag.
tag
(lsp.CompletionItemTag
) — the LSP completion item tag to convertThe completion item tag as Monaco editor completion item tag (monaco.languages.CompletionItemTag
).
toCompletionList(completionList, options)
Convert an LSP completion list to a Monaco editor completion list.
completionList
(lsp.CompletionList
) — the LSP completion list to convertoptions
(ToCompletionListOptions
) — additional options needed to construct the Monaco
completion listThe completion list as Monaco editor completion list (monaco.languages.CompletionList
).
toCompletionTriggerKind(kind)
Convert an LSP completion trigger kind to a Monaco editor completion trigger kind.
kind
(lsp.CompletionTriggerKind
) — the LSP completion trigger kind to convertThe completion trigger kind as Monaco editor completion trigger kind
(monaco.languages.CompletionTriggerKind
).
toDefinition(definition)
Convert an LSP definition to a Monaco editor definition.
definition
(lsp.Definition
) — the LSP definition to convertThe definition as Monaco editor definition (monaco.languages.Definition
).
toDocumentHighlight(documentHighlight)
Convert an LSP document highlight to a Monaco editor document highlight.
documentHighlight
(lsp.DocumentHighlight
) — the LSP document highlight to convertThe document highlight as Monaco editor document highlight (monaco.languages.DocumentHighlight
).
toDocumentHighlightKind(kind)
Convert an LSP document highlight kind to a Monaco editor document highlight kind.
kind
(lsp.DocumentHighlightKind
) — the LSP document highlight kind to convertThe document highlight kind as Monaco editor document highlight kind
(monaco.languages.DocumentHighlightKind
).
toDocumentSymbol(documentSymbol)
Convert an LSP document symbol to a Monaco editor document symbol.
documentSymbol
(lsp.DocumentSymbol
) — the LSP document symbol to convertThe document symbol as Monaco editor document symbol (monaco.languages.DocumentSymbol
).
toFoldingRange(foldingRange)
Convert an LSP folding range to a Monaco editor folding range.
foldingRange
(lsp.FoldingRange
) — the LSP folding range to convertThe folding range as Monaco editor folding range (monaco.languages.FoldingRange
).
toFormattingOptions(formattingOptions)
Convert an LSP formatting options to a Monaco editor formatting options.
formattingOptions
(lsp.FormattingOptions
) — the LSP formatting options to convertThe formatting options as Monaco editor formatting options (monaco.languages.FormattingOptions
).
toHover(hover)
Convert an LSP hover to a Monaco editor hover.
hover
(lsp.Hover
) — the LSP hover to convertThe hover as Monaco editor hover (monaco.languages.Hover
).
toInlayHint(inlayHint)
Convert an LSP inlay hint to a Monaco editor inlay hint.
inlayHint
(lsp.InlayHint
) — the LSP inlay hint to convertThe inlay hint as Monaco editor inlay hint (monaco.languages.InlayHint
).
toInlayHintKind(inlayHintKind)
Convert an LSP inlay hint kind to a Monaco editor inlay hint kind.
inlayHintKind
(lsp.InlayHintKind
) — the LSP inlay hint kind to convertThe inlay hint kind as Monaco editor inlay hint kind (monaco.languages.InlayHintKind
).
toInlayHintLabelPart(inlayHintLabelPart)
Convert an LSP inlay hint label part to a Monaco editor inlay hint label part.
inlayHintLabelPart
(lsp.InlayHintLabelPart
) — the LSP inlay hint label part to convertThe inlay hint label part as Monaco editor inlay hint label part
(monaco.languages.InlayHintLabelPart
).
toLink(documentLink)
Convert an LSP document link to a Monaco editor link.
documentLink
(lsp.DocumentLink
) — the LSP document link to convertThe document link as Monaco editor link (monaco.languages.ILink
).
toLinkedEditingRanges(linkedEditingRanges)
Convert LSP linked editing ranges to Monaco editor linked editing ranges.
linkedEditingRanges
(lsp.LinkedEditingRanges
) — the LSP linked editing ranges to convertThe linked editing ranges Monaco editor linked editing ranges
(monaco.languages.LinkedEditingRanges
).
toLocation(location)
Convert an LSP location to a Monaco editor location.
location
(lsp.Location
) — the LSP location to convertThe location as Monaco editor location (monaco.languages.Location
).
toLocationLink(locationLink)
Convert an LSP location link to a Monaco editor location link.
locationLink
(lsp.LocationLink
) — the LSP location link to convertThe location link as Monaco editor location link (monaco.languages.LocationLink
).
toMarkdownString(markupContent)
Convert an LSP markup content to a Monaco editor markdown string.
markupContent
(lsp.MarkupContent
) — the LSP markup content to convertThe markup content as a Monaco editor markdown string (monaco.IMarkdownString
).
toMarkerData(diagnostic)
Convert an LSP diagnostic to a Monaco editor marker data.
diagnostic
(lsp.Diagnostic
) — the LSP diagnostic to convertThe diagnostic as Monaco editor marker data (monaco.editor.IMarkerData
).
toMarkerSeverity(severity)
Convert an LSP diagnostic severity to a Monaco editor marker severity.
severity
(lsp.DiagnosticSeverity
) — the LSP diagnostic severity to convertThe diagnostic severity as Monaco editor marker severity (monaco.MarkerSeverity
).
toMarkerTag(tag)
Convert an LSP diagnostic tag to a Monaco editor marker tag.
tag
(lsp.DiagnosticTag
) — the LSP diagnostic tag to convertThe diagnostic tag as Monaco editor marker tag (monaco.MarkerTag
).
toParameterInformation(parameterInformation)
Convert an LSP parameter information to a Monaco editor parameter information.
parameterInformation
(lsp.ParameterInformation
) — the LSP parameter information to convertThe parameter information as Monaco editor parameter information
(monaco.languages.ParameterInformation
).
toPosition(position)
Convert an LSP position to a Monaco editor position.
position
(lsp.Position
) — the LSP position to convertThe position as Monaco editor position (monaco.IPosition
).
toRange(range)
Convert an LSP range to a Monaco editor range.
range
(lsp.Range
) — the LSP range to convertThe range as Monaco editor range (monaco.IRange
).
toRelatedInformation(relatedInformation)
Convert an LSP diagnostic related information to a Monaco editor related information.
relatedInformation
(lsp.DiagnosticRelatedInformation
) — the LSP diagnostic related information
to convertThe diagnostic related information as Monaco editor related information
(monaco.editor.IRelatedInformation
).
toSelectionRange(selectionRange)
Convert an LSP selection range to a Monaco editor selection range.
selectionRange
(lsp.SelectionRange
) — the LSP selection range to convertThe selection range as Monaco editor selection range (monaco.languages.SelectionRange
).
toSemanticTokens(semanticTokens)
Convert LSP semantic tokens to Monaco editor semantic tokens.
semanticTokens
(lsp.SemanticTokens
) — the LSP semantic tokens to convertThe semantic tokens as Monaco editor semantic tokens (monaco.languages.SemanticTokens
).
toSemanticTokensEdit(semanticTokensEdit)
Convert LSP semantic tokens to Monaco editor semantic tokens.
semanticTokensEdit
(lsp.SemanticTokensEdit
) — the LSP semantic tokens to convertThe semantic tokens as Monaco editor semantic tokens (monaco.languages.SemanticTokensEdit
).
toSemanticTokensEdits(semanticTokensDelta)
Convert an LSP semantic tokens delta to Monaco editsor semantic tokens edits.
semanticTokensDelta
(lsp.SemanticTokensDelta
) — the LSP semantic tokens delta to convertThe semantic tokens delta as Monaco editsor semantic tokens edits
(monaco.languages.SemanticTokensEdits
).
toSignatureHelp(signatureHelp)
Convert an LSP signature help to a Monaco editor signature help.
signatureHelp
(lsp.SignatureHelp
) — the LSP signature help to convertThe signature help as Monaco editor signature help (monaco.languages.SignatureHelp
).
toSignatureHelpContext(signatureHelpContext)
Convert an LSP signature help context to a Monaco editor signature help context.
signatureHelpContext
(lsp.SignatureHelpContext
) — the LSP signature help context to convertThe signature help context as Monaco editor signature help context
(monaco.languages.SignatureHelpContext
).
toSignatureHelpTriggerKind(signatureHelpTriggerKind)
Convert an LSP signature help trigger kind to a Monaco editor signature help trigger kind.
signatureHelpTriggerKind
(lsp.SignatureHelpTriggerKind
) — the LSP signature help trigger kind
to convertThe signature help trigger kind as Monaco editor signature help trigger kind
(monaco.languages.SignatureHelpTriggerKind
).
toSignatureInformation(signatureInformation)
Convert an LSP signature information to a Monaco editor signature information.
signatureInformation
(lsp.SignatureInformation
) — the LSP signature information to convertThe signature information as Monaco editor signature information
(monaco.languages.SignatureInformation
).
toSingleEditOperation(textEdit)
Convert an LSP text edit to a Monaco editor single edit operation.
textEdit
(lsp.TextEdit
) — the LSP text edit to convertThe text edit as Monaco editor single edit operation (monaco.editor.ISingleEditOperation
).
toSymbolKind(symbolKind)
Convert an LSP symbol kind to a Monaco editor symbol kind.
symbolKind
(lsp.SymbolKind
) — the LSP symbol kind to convertThe symbol kind as Monaco editor symbol kind (monaco.languages.SymbolKind
).
toSymbolTag(symbolTag)
Convert an LSP symbol tag to a Monaco editor symbol tag.
symbolTag
(lsp.SymbolTag
) — the LSP symbol tag to convertThe symbol tag as Monaco editor symbol tag (monaco.languages.SymbolTag
).
toTextEdit(textEdit)
Convert an LSP text edit to a Monaco editor text edit.
textEdit
(lsp.TextEdit
) — the LSP text edit to convertThe text edit as Monaco editor text edit (monaco.languages.TextEdit
).
toWorkspaceEdit(workspaceEdit)
Convert an LSP workspace edit to a Monaco editor workspace edit.
workspaceEdit
(lsp.WorkspaceEdit
) — the LSP workspace edit to convertThe workspace edit as Monaco editor workspace edit (monaco.languages.WorkspaceEdit
).
toWorkspaceFileEdit(workspaceFileEdit)
Convert an LSP workspace file edit to a Monaco editor workspace file edit.
workspaceFileEdit
(lsp.CreateFile | lsp.DeleteFile | lsp.RenameFile
) — the LSP workspace file
edit to convertThe workspace file edit options Monaco editor workspace file edit options
(monaco.languages.IWorkspaceFileEdit
).
toWorkspaceFileEditOptions(options)
Convert LSP workspace file edit options to Monaco editor workspace file edit options.
options
(lsp.CreateFileOptions & lsp.DeleteFileOptions & lsp.RenameFileOptions
) — the LSP
workspace file edit options to convertThe workspace file edit options Monaco editor workspace file edit options
(monaco.languages.WorkspaceFileEditOptions
).
FAQs
Convert between language server types and Monaco editor types
We found that monaco-languageserver-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.