Table of Contents

Class LspTypesMapper

Namespace
NMF.AnyText
Assembly
NMF.AnyText.Lsp.dll

Class To Map Types used In Parser To LSP-Types

public static class LspTypesMapper
Inheritance
LspTypesMapper
Inherited Members

Fields

SymbolKindMappings

Gets the mappings of symbol kinds to completion item kinds

public static readonly ReadOnlyDictionary<SymbolKind, CompletionItemKind> SymbolKindMappings

Field Value

ReadOnlyDictionary<SymbolKind, CompletionItemKind>

Methods

MapToLspTextEdits(IEnumerable<TextEdit>)

Maps a collection of TextEdit objects to a collection of LspTypes.TextEdit objects.

public static IEnumerable<TextEdit> MapToLspTextEdits(IEnumerable<TextEdit> edits)

Parameters

edits IEnumerable<TextEdit>

The collection of TextEdit objects to be mapped.

Returns

IEnumerable<TextEdit>

An IEnumerable<T> representing the mapped LSP text edits.

MapWorkspaceEdit(WorkspaceEdit, string, bool)

Maps a WorkspaceEdit objects to a LspTypes.WorkspaceEdit.

public static WorkspaceEdit MapWorkspaceEdit(WorkspaceEdit workspaceEdit, string workspaceUri, bool useDocumentChanges = false)

Parameters

workspaceEdit WorkspaceEdit

The WorkspaceEdit object to be mapped.

workspaceUri string

The workspace Uri for the edit.

useDocumentChanges bool

Option to use DocumentChange instead of TextEdit changes.

Returns

WorkspaceEdit

A LspTypes.WorkspaceEdit representing the mapped LSP workspace edit.