Files
clice/include/Basic/Document.h
2024-12-04 01:12:40 +08:00

51 lines
1.1 KiB
C++

#pragma once
#include "Location.h"
namespace clice::proto {
struct TextDocumentItem {
/// The text document's URI.
DocumentUri uri;
/// The text document's language identifier.
string languageId;
/// The version number of this document (it will strictly increase after each
/// change, including undo/redo).
uinteger version;
/// The content of the opened text document.
string text;
};
struct TextDocumentIdentifier {
/// The text document's URI.
DocumentUri uri;
};
struct VersionedTextDocumentIdentifier {
/// The text document's URI.
DocumentUri uri;
/// The version number of this document.
///
/// The version number of a document will increase after each change,
/// including undo/redo. The number doesn't need to be consecutive.
integer version;
};
struct TextDocumentContentChangeEvent {
/// The new text of the whole document.
string text;
};
struct TextDocumentPositionParams {
/// The text document.
TextDocumentIdentifier textDocument;
/// The position inside the text document.
Position position;
};
} // namespace clice::proto