clang-tools 19.0.0git
Public Attributes | List of all members
clang::clangd::WorkspaceEdit Struct Reference

The edit should either provide changes or documentChanges. More...

#include <Protocol.h>

Public Attributes

std::optional< std::map< std::string, std::vector< TextEdit > > > changes
 Holds changes to existing resources.
 
std::optional< std::vector< TextDocumentEdit > > documentChanges
 Versioned document edits.
 
std::map< std::string, ChangeAnnotationchangeAnnotations
 A map of change annotations that can be referenced in AnnotatedTextEdit.
 

Detailed Description

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.

Definition at line 1010 of file Protocol.h.

Member Data Documentation

◆ changeAnnotations

std::map<std::string, ChangeAnnotation> clang::clangd::WorkspaceEdit::changeAnnotations

A map of change annotations that can be referenced in AnnotatedTextEdit.

Definition at line 1022 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), and clang::clangd::toJSON().

◆ changes

std::optional<std::map<std::string, std::vector<TextEdit> > > clang::clangd::WorkspaceEdit::changes

Holds changes to existing resources.

Definition at line 1012 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), and clang::clangd::toJSON().

◆ documentChanges

std::optional<std::vector<TextDocumentEdit> > clang::clangd::WorkspaceEdit::documentChanges

Versioned document edits.

If a client neither supports documentChanges nor workspace.workspaceEdit.resourceOperations then only plain TextEdits using the changes property are supported.

Definition at line 1018 of file Protocol.h.

Referenced by clang::clangd::fromJSON(), and clang::clangd::toJSON().


The documentation for this struct was generated from the following file: