summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h
blob: 5302316c6f53312de45843fcff67bc80b9fd9cb5 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once


#include "LibLsp/JsonRpc/RequestInMessage.h"
#include "LibLsp/JsonRpc/lsResponseMessage.h"

#include "LibLsp/lsp/lsMarkedString.h"
#include "LibLsp/lsp/lsTextDocumentPositionParams.h"
#include "LibLsp/lsp/lsRange.h"
/**
 * The hover request is sent from the client to the server to request hover
 * information at a given text document position.
 *
 * Registration Options: TextDocumentRegistrationOptions
 */

namespace TextDocumentHover
{
	typedef  boost::optional< std::vector< std::pair<boost::optional<std::string>, boost::optional<lsMarkedString>> > > Left;
	typedef   std::pair< Left, boost::optional<MarkupContent> >  Either;
	struct Result {
		/**
		 * The hover's content as markdown
		 */
		Either  contents;
		
		/**
		 * An boost::optional range
		 */
		boost::optional<lsRange> range;

		MAKE_SWAP_METHOD(Result, contents, range)
	};
}
MAKE_REFLECT_STRUCT(TextDocumentHover::Result, contents, range);

extern  void Reflect(Reader& visitor, std::pair<boost::optional<std::string>, boost::optional<lsMarkedString>>& value);
extern  void Reflect(Reader& visitor, TextDocumentHover::Either& value);


DEFINE_REQUEST_RESPONSE_TYPE(td_hover, lsTextDocumentPositionParams, TextDocumentHover::Result, "textDocument/hover")

//struct Rsp_TextDocumentHover : ResponseMessage< TextDocumentHover::Result, Rsp_TextDocumentHover> {
//
//};
//MAKE_REFLECT_STRUCT(Rsp_TextDocumentHover,
//	jsonrpc,
//	id,
//	result);

//MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(Rsp_TextDocumentHover,
//                                        jsonrpc,
//										 id,
//                                        result);