Adds language code intelligence features to the TextEditor
component, such
as completion, signature help, hover tool tips, ctrl+click jump to
definition, etc.
This component uses value objects (VOs) that are based on the
Language Server Protocol (which is where the name LspTextEditor
comes
from). However, using this protocol is not mandatory. As long as objects are
translated into LSP VOs, any other provider of code intelligence data may be
used instead.
Constructor
new(?textDocument:Null<TextDocumentIdentifier>, ?text:String, readOnly:Bool = false)
Creates a new LspTextEditor
object.
Variables
completionTriggerCharacters:Array<String> = ["."]
A set of characters that, when typed by the user, will trigger a request for completion.
diagnostics:Array<Diagnostic>
The diagnostics (compiler errors, warnings, and informational messages) that are associated with the currently displayed file.
signatureHelpTriggerCharacters:Array<String> = ["(", ","]
A set of characters that, when typed by the user, will trigger a request for signature help.
Methods
applyTextEdits(textEdits:Array<TextEdit>):Void
Applies a set of text edits to the currently displayed text.
clearCodeActions():Void
Cancels active code actions requests and clears the pop-up code actions view.
clearCompletion():Void
Cancels active completion requests and clears the pop-up completion list view.
clearSignatureHelp():Void
Cancels active signature help requests and clears the pop-up signature help view.