refactor
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
#include "./basic_types.hpp"
|
||||
#include "./document_sync.hpp"
|
||||
#include "./progress.hpp"
|
||||
|
||||
namespace lsp::protocol
|
||||
{
|
||||
enum class PrepareSupportDefaultBehavior
|
||||
{
|
||||
kIdentifier = 1
|
||||
};
|
||||
|
||||
// Rename
|
||||
struct RenameClientCapabilities
|
||||
{
|
||||
std::optional<boolean> dynamicRegistration;
|
||||
std::optional<boolean> prepareSupport;
|
||||
std::optional<PrepareSupportDefaultBehavior> prepareSupportDefaultBehavior;
|
||||
std::optional<boolean> honorsChangeAnnotations;
|
||||
};
|
||||
|
||||
struct RenameOptions : WorkDoneProgressOptions
|
||||
{
|
||||
std::optional<boolean> prepareProvider;
|
||||
};
|
||||
|
||||
struct RenameRegistrationOptions : TextDocumentRegistrationOptions, RenameOptions
|
||||
{
|
||||
};
|
||||
|
||||
struct RenameParams : TextDocumentPositionParams, WorkDoneProgressParams
|
||||
{
|
||||
string newName;
|
||||
};
|
||||
|
||||
struct PrepareRenameParams : TextDocumentPositionParams, WorkDoneProgressParams
|
||||
{
|
||||
};
|
||||
|
||||
// Linked Editing Range
|
||||
struct LinkedEditingRangeClientCapabilities
|
||||
{
|
||||
std::optional<boolean> dynamicRegistration;
|
||||
};
|
||||
|
||||
struct LinkedEditingRangeOptions : WorkDoneProgressOptions
|
||||
{
|
||||
};
|
||||
|
||||
struct LinkedEditingRangeRegistrationOptions : TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions
|
||||
{
|
||||
};
|
||||
|
||||
struct LinkedEditingRangeParams : TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams
|
||||
{
|
||||
};
|
||||
|
||||
struct LinkedEditingRanges
|
||||
{
|
||||
std::vector<Range> ranges;
|
||||
std::optional<string> wordPattern;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user