File: lsVersionedTextDocumentIdentifier.h

package info (click to toggle)
asymptote 2.85%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 43,264 kB
  • sloc: cpp: 210,491; ansic: 98,376; python: 14,568; javascript: 6,629; sh: 4,301; perl: 1,566; lisp: 1,505; makefile: 764; yacc: 554; lex: 446; xml: 182; objc: 177
file content (32 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "LibLsp/JsonRpc/serializer.h"

#include "LibLsp/JsonRpc/message.h"
#include "LibLsp/lsp/lsDocumentUri.h"
#include "LibLsp/lsp/lsTextDocumentIdentifier.h"

struct lsVersionedTextDocumentIdentifier
{
        lsDocumentUri uri;
        // The version number of this document.  number | null
        boost::optional<int> version;

        lsTextDocumentIdentifier AsTextDocumentIdentifier() const;

        MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version)
};
MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version)

/**
 * The version number of this document. If an optional versioned text document
 * identifier is sent from the server to the client and the file is not
 * open in the editor (the server has not received an open notification
 * before) the server can send `null` to indicate that the version is
 * known and the content on disk is the master (as specified with document
 * content ownership).
 *
 * The version number of a document will increase after each change,
 * including undo/redo. The number doesn't need to be consecutive.
 */
using   lsOptionalVersionedTextDocumentIdentifier = lsVersionedTextDocumentIdentifier;