Table of Contents

Class SynchronizingLspServer

Namespace
NMF.AnyText
Assembly
NMF.AnyText.Synchronizations.dll

Denotes an LSP server that performs document synchronization

public class SynchronizingLspServer : LspServer, ILspServer
Inheritance
SynchronizingLspServer
Implements
Inherited Members

Constructors

SynchronizingLspServer(IEnumerable<Grammar>, IModelServer, params IModelSynchronization[])

Creates a new instance

public SynchronizingLspServer(IEnumerable<Grammar> grammars, IModelServer modelServer, params IModelSynchronization[] synchronizations)

Parameters

grammars IEnumerable<Grammar>

the grammars supported by this LSP server

modelServer IModelServer

a local model server

synchronizations IModelSynchronization[]

a collection of model synchronizations

SynchronizingLspServer(IEnumerable<Grammar>, IModelServer, IEnumerable<IModelSynchronization>)

Creates a new instance

public SynchronizingLspServer(IEnumerable<Grammar> grammars, IModelServer modelServer, IEnumerable<IModelSynchronization> synchronizations)

Parameters

grammars IEnumerable<Grammar>

the grammars supported by this LSP server

modelServer IModelServer

a local model server

synchronizations IEnumerable<IModelSynchronization>

a collection of model synchronizations

Properties

SystemCommands

Gets a collection of available system commands

protected override IEnumerable<string> SystemCommands { get; }

Property Value

IEnumerable<string>

Methods

CodeLensesForDocument(Parser, IEnumerable<CodeLens>)

Calculates the code lenses for the given document

protected override IEnumerable<CodeLens> CodeLensesForDocument(Parser document, IEnumerable<CodeLens> codeLenses)

Parameters

document Parser

the document for which to calculate code lenses

codeLenses IEnumerable<CodeLens>

the code lenses obtained from the document

Returns

IEnumerable<CodeLens>

A collection of code lenses

HandleExtensionCommand(string, object[])

Allows derived classes to handle an extension command

protected override bool HandleExtensionCommand(string commandIdentifier, object[] args)

Parameters

commandIdentifier string

the identifier of the command

args object[]

command arguments

Returns

bool

true, if the command was handled, otherwise false

OnDocumentUpdate(Parser, IEnumerable<TextEdit>, string)

Gets called when a document should be updated

protected override void OnDocumentUpdate(Parser document, IEnumerable<TextEdit> edits, string uri)

Parameters

document Parser

the parsed document

edits IEnumerable<TextEdit>

the edits that should be performed

uri string

the URI of the document

OpenNewDocument(Parser)

Gets called when a new document is opened

protected override void OpenNewDocument(Parser parser)

Parameters

parser Parser

the opened document

PostProcessCompletions(Parser, IEnumerable<CompletionItem>)

Performs a post-processing on the given completion collection

protected override IEnumerable<CompletionItem> PostProcessCompletions(Parser document, IEnumerable<CompletionItem> completions)

Parameters

document Parser

the document for which the completion list is requested

completions IEnumerable<CompletionItem>

the current list of completions

Returns

IEnumerable<CompletionItem>

a potentially modified list of completions