tree-sitter and lsp-methods
This commit is contained in:
@@ -67,6 +67,7 @@ namespace lsp::protocol
|
||||
struct TextDocumentContentChangeEvent
|
||||
{
|
||||
Range range;
|
||||
std::optional<uinteger> rangeLength;
|
||||
string text;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace lsp::protocol
|
||||
{
|
||||
enum class ErrorCode : int
|
||||
enum class ErrorCodes : int
|
||||
{
|
||||
kParseError = -32700,
|
||||
kInvalidRequest = -32600,
|
||||
@@ -37,7 +37,7 @@ namespace lsp::protocol
|
||||
|
||||
struct ResponseError: Message
|
||||
{
|
||||
ErrorCode code;
|
||||
ErrorCodes code;
|
||||
string message;
|
||||
std::optional<LSPAny> data;
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace lsp::protocol
|
||||
|
||||
struct SemanticTokensLegend
|
||||
{
|
||||
std::vector<string> tokenType;
|
||||
std::vector<string> tokenTypes;
|
||||
std::vector<string> tokenModifiers;
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace lsp::protocol
|
||||
|
||||
SemanticTokensLegend legend;
|
||||
std::optional<boolean> range;
|
||||
std::variant<Full, boolean> full;
|
||||
std::optional<std::variant<Full, boolean>> full;
|
||||
};
|
||||
|
||||
struct SemanticTokensRegistrationOptions : TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions
|
||||
@@ -124,7 +124,7 @@ namespace lsp::protocol
|
||||
{
|
||||
uinteger start;
|
||||
uinteger deleteCount;
|
||||
std::optional<uinteger> data;
|
||||
std::optional<std::vector<uinteger>> data;
|
||||
};
|
||||
|
||||
struct SemanticTokensDelta
|
||||
|
||||
@@ -52,6 +52,16 @@ namespace lsp::protocol
|
||||
std::optional<std::vector<DocumentSymbol>> children;
|
||||
};
|
||||
|
||||
struct SymbolInformation
|
||||
{
|
||||
string name;
|
||||
SymbolKind kind;
|
||||
std::optional<std::vector<SymbolTag>> tags;
|
||||
std::optional<boolean> deprecated;
|
||||
Location location;
|
||||
std::optional<string> containerName;
|
||||
};
|
||||
|
||||
struct DocumentSymbolClientCapabilities
|
||||
{
|
||||
struct SymbolKinds
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
#include <exception>
|
||||
#include "../detail/basic_types.hpp"
|
||||
|
||||
namespace lsp::transform
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace lsp::transform
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
std::optional<std::string> Serialize(const T& obj)
|
||||
inline std::optional<std::string> Serialize(const T& obj)
|
||||
{
|
||||
std::string json;
|
||||
auto ce = glz::write_json(obj, json);
|
||||
|
||||
Reference in New Issue
Block a user