class

LSP::WorkspaceEdit

Inherits JSON::Serializable < LSP::Initializer < Reference < Object

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.

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

changes

Holds changes to existing resources.

Source
changes=(changes : Hash(String, Array(TextEdit)))

Holds changes to existing resources.

Source
document_changes

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.

Source
document_changes=(document_changes : Array(TextDocumentEdit) | Array(TextDocumentEdit | CreateFile | RenameFile | DeleteFile) | Nil)

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.

Source