Debian Codegraph @

LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h

raw
1 #pragma once
2
3 #include "LibLsp/JsonRpc/serializer.h"
4
5 #include "LibLsp/JsonRpc/message.h"
6 #include "LibLsp/lsp/lsDocumentUri.h"
7 #include "LibLsp/lsp/lsTextDocumentIdentifier.h"
8
9 struct lsVersionedTextDocumentIdentifier
10 {
11 lsDocumentUri uri;
12 // The version number of this document. number | null
13 optional<int> version;
14
15 lsTextDocumentIdentifier AsTextDocumentIdentifier() const;
16
17 MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version)
18 };
19 MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version)
20
21 /**
22 * The version number of this document. If an optional versioned text document
23 * identifier is sent from the server to the client and the file is not
24 * open in the editor (the server has not received an open notification
25 * before) the server can send `null` to indicate that the version is
26 * known and the content on disk is the master (as specified with document
27 * content ownership).
28 *
29 * The version number of a document will increase after each change,
30 * including undo/redo. The number doesn't need to be consecutive.
31 */
32 using lsOptionalVersionedTextDocumentIdentifier = lsVersionedTextDocumentIdentifier;