Class: LSP::WorkspaceEdit
Overview
export interface WorkspaceEdit {
/**
* Holds changes to existing resources.
*/
changes?: {
[uri: string]: TextEdit[];
};
/**
* Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
* are either an array of `TextDocumentEdit`s 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 `TextDocumentEdit`s 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 `TextEdit`s using the `changes` property are supported.
*/
documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
}
Instance Attribute Summary collapse
-
#changes ⇒ Object
type: {.
-
#documentChanges ⇒ Object
[uri: string]: TextEdit[]; }.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ WorkspaceEdit
constructor
A new instance of WorkspaceEdit.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ WorkspaceEdit
Returns a new instance of WorkspaceEdit.
617 618 619 620 |
# File 'lib/lsp/lsp_types.rb', line 617 def initialize(initial_hash = nil) super @optional_method_names = %i[changes documentChanges] end |
Instance Attribute Details
#changes ⇒ Object
type: {
612 613 614 |
# File 'lib/lsp/lsp_types.rb', line 612 def changes @changes end |
#documentChanges ⇒ Object
[uri: string]: TextEdit[];
}
615 616 617 |
# File 'lib/lsp/lsp_types.rb', line 615 def documentChanges @documentChanges end |
Instance Method Details
#from_h!(value) ⇒ Object
622 623 624 625 626 627 |
# File 'lib/lsp/lsp_types.rb', line 622 def from_h!(value) value = {} if value.nil? self.changes = value['changes'] # Unknown type self.documentChanges = value['documentChanges'] # Unknown type self end |