class
LSP::WorkspaceEdit
- LSP::WorkspaceEdit
- Reference
- Object
Overview
A workspace edit represents changes to many resources managed in the workspace.
The edit should either provide changes or documentChanges. If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes.
Included Modules
Defined in:
base/workspace_edit.crConstructors
Instance Method Summary
-
#changes : Hash(String, Array(TextEdit))
Holds changes to existing resources.
-
#changes=(changes : Hash(String, Array(TextEdit)))
Holds changes to existing resources.
-
#document_changes : Array(TextDocumentEdit) | Array(TextDocumentEdit | CreateFile | RenameFile | DeleteFile) | Nil
Depending on the client capability
workspace.workspaceEdit.resourceOperationsdocument changes are either an array ofTextDocumentEdits to express changes to n different text documents where each text document edit addresses a specific version of a text document. -
#document_changes=(document_changes : Array(TextDocumentEdit) | Array(TextDocumentEdit | CreateFile | RenameFile | DeleteFile) | Nil)
Depending on the client capability
workspace.workspaceEdit.resourceOperationsdocument changes are either an array ofTextDocumentEdits to express changes to n different text documents where each text document edit addresses a specific version of a text document.
Macros inherited from module JSON::Serializable
json_discriminator(field, mapping, *, default = nil)
json_discriminator
Constructor Detail
Instance Method Detail
Holds changes to existing resources.
Depending on the client capability workspace.workspaceEdit.resourceOperations document changes
are either an array of TextDocumentEdits to express changes to n different text documents
where each text document edit addresses a specific version of a text document. Or it can contain
above TextDocumentEdits mixed with create, rename and delete file / folder operations.
Whether a client supports versioned document edits is expressed via
workspace.workspaceEdit.documentChanges client capability.
If a client neither supports documentChanges nor workspace.workspaceEdit.resourceOperations then
only plain TextEdits using the #changes property are supported.
Depending on the client capability workspace.workspaceEdit.resourceOperations document changes
are either an array of TextDocumentEdits to express changes to n different text documents
where each text document edit addresses a specific version of a text document. Or it can contain
above TextDocumentEdits mixed with create, rename and delete file / folder operations.
Whether a client supports versioned document edits is expressed via
workspace.workspaceEdit.documentChanges client capability.
If a client neither supports documentChanges nor workspace.workspaceEdit.resourceOperations then
only plain TextEdits using the #changes property are supported.