summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-08 18:39:01 +0000
committerKarl Berry <karl@freefriends.org>2022-01-08 18:39:01 +0000
commitbedc9a5694f7c40a2645919601638d2dbef4145b (patch)
tree22548fd073b3f2f5a287c2487d69bfc656125ef6 /Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h
parentc2c4540ab1d27a23c085ce5081f6366cfabb31f6 (diff)
asy 2.75 sources
git-svn-id: svn://tug.org/texlive/trunk@61532 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h')
-rw-r--r--Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h b/Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h
new file mode 100644
index 00000000000..22574e3e194
--- /dev/null
+++ b/Build/source/utils/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h
@@ -0,0 +1,63 @@
+#pragma once
+
+
+#include "LibLsp/JsonRpc/RequestInMessage.h"
+#include "LibLsp/JsonRpc/lsResponseMessage.h"
+
+#include "LibLsp/lsp/lsTextDocumentIdentifier.h"
+#include "LibLsp/lsp/lsRange.h"
+#include "documentColor.h"
+#include "LibLsp/lsp/lsTextEdit.h"
+
+
+struct ColorPresentationParams {
+
+ /**
+ * The text document.
+ */
+ lsTextDocumentIdentifier textDocument;
+
+ /**
+ * The range in the document where this color appers.
+ */
+
+ lsRange range;
+
+ /**
+ * The actual color value for this color range.
+ */
+
+ TextDocument::Color color;
+ MAKE_SWAP_METHOD(ColorPresentationParams, textDocument, range, color)
+};
+MAKE_REFLECT_STRUCT(ColorPresentationParams, textDocument, range, color)
+
+
+struct ColorPresentation {
+ /**
+ * The label of this color presentation. It will be shown on the color
+ * picker header. By default this is also the text that is inserted when selecting
+ * this color presentation.
+ */
+
+ std::string label;
+
+ /**
+ * An edit which is applied to a document when selecting
+ * this presentation for the color. When `null` the label is used.
+ */
+ lsTextEdit textEdit;
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
+ */
+ std::vector<lsTextEdit> additionalTextEdits;
+ MAKE_SWAP_METHOD(ColorPresentation, label, textEdit, additionalTextEdits)
+};
+MAKE_REFLECT_STRUCT(ColorPresentation, label, textEdit, additionalTextEdits)
+
+
+
+DEFINE_REQUEST_RESPONSE_TYPE(td_colorPresentation,
+ ColorPresentationParams, std::vector<ColorPresentation>, "textDocument/colorPresentation") \ No newline at end of file