lsp协议的枚举不使用google风格
This commit is contained in:
@@ -196,8 +196,8 @@ namespace lsp::protocol
|
||||
|
||||
enum class ApplyKind
|
||||
{
|
||||
kReplace = 1,
|
||||
kMerge = 2
|
||||
Replace = 1,
|
||||
Merge = 2
|
||||
};
|
||||
|
||||
using MarkupKind = std::string_view;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace lsp::protocol
|
||||
|
||||
enum class CodeActionTag
|
||||
{
|
||||
kLLMGenerated = 1
|
||||
LLMGenerated = 1
|
||||
};
|
||||
|
||||
struct CodeActionClientCapabilities
|
||||
|
||||
@@ -7,55 +7,55 @@ namespace lsp::protocol
|
||||
{
|
||||
enum class CompletionItemTag
|
||||
{
|
||||
kDeprecated = 1
|
||||
Deprecated = 1
|
||||
};
|
||||
|
||||
enum class InsertTextMode
|
||||
{
|
||||
kAsIs = 1,
|
||||
kAdjustIndentation = 2
|
||||
AsIs = 1,
|
||||
AdjustIndentation = 2
|
||||
};
|
||||
|
||||
enum class CompletionItemKind
|
||||
{
|
||||
kText = 1,
|
||||
kMethod = 2,
|
||||
kFunction = 3,
|
||||
kConstructor = 4,
|
||||
kField = 5,
|
||||
kVariable = 6,
|
||||
kClass = 7,
|
||||
kInterface = 8,
|
||||
kModule = 9,
|
||||
kProperty = 10,
|
||||
kUnit = 11,
|
||||
kValue = 12,
|
||||
kEnum = 13,
|
||||
kKeyword = 14,
|
||||
kSnippet = 15,
|
||||
kColor = 16,
|
||||
kFile = 17,
|
||||
kReference = 18,
|
||||
kFolder = 19,
|
||||
kEnumMember = 20,
|
||||
kConstant = 21,
|
||||
kStruct = 22,
|
||||
kEvent = 23,
|
||||
kOperator = 24,
|
||||
kTypeParameter = 25
|
||||
Text = 1,
|
||||
Method = 2,
|
||||
Function = 3,
|
||||
Constructor = 4,
|
||||
Field = 5,
|
||||
Variable = 6,
|
||||
Class = 7,
|
||||
Interface = 8,
|
||||
Module = 9,
|
||||
Property = 10,
|
||||
Unit = 11,
|
||||
Value = 12,
|
||||
Enum = 13,
|
||||
Keyword = 14,
|
||||
Snippet = 15,
|
||||
Color = 16,
|
||||
File = 17,
|
||||
Reference = 18,
|
||||
Folder = 19,
|
||||
EnumMember = 20,
|
||||
Constant = 21,
|
||||
Struct = 22,
|
||||
Event = 23,
|
||||
Operator = 24,
|
||||
TypeParameter = 25
|
||||
};
|
||||
|
||||
enum class InsertTextFormat
|
||||
{
|
||||
kPlainText = 1,
|
||||
kSnippet = 2
|
||||
PlainText = 1,
|
||||
Snippet = 2
|
||||
};
|
||||
|
||||
enum CompletionTriggerKind
|
||||
{
|
||||
kInvoked = 1,
|
||||
kTriggerCharacter = 2,
|
||||
kTriggerForIncompleteCompletions = 3
|
||||
Invoked = 1,
|
||||
TriggerCharacter = 2,
|
||||
TriggerForIncompleteCompletions = 3
|
||||
};
|
||||
|
||||
struct CompletionContext
|
||||
@@ -200,8 +200,8 @@ namespace lsp::protocol
|
||||
|
||||
enum class InlineCompletionTriggerKind
|
||||
{
|
||||
kInvoked = 1,
|
||||
kAutomatic = 2
|
||||
Invoked = 1,
|
||||
Automatic = 2
|
||||
};
|
||||
|
||||
struct SelectedCompletionInfo
|
||||
|
||||
@@ -50,11 +50,11 @@ namespace lsp::protocol
|
||||
// Message
|
||||
enum class MessageType
|
||||
{
|
||||
kError = 1,
|
||||
kWarning = 2,
|
||||
kInfo = 3,
|
||||
kLog = 4,
|
||||
kDebug = 5
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Info = 3,
|
||||
Log = 4,
|
||||
Debug = 5
|
||||
};
|
||||
|
||||
struct ShowMessageParams
|
||||
|
||||
@@ -7,16 +7,16 @@ namespace lsp::protocol
|
||||
{
|
||||
enum class DiagnosticSeverity
|
||||
{
|
||||
kError = 1,
|
||||
kWarning = 2,
|
||||
kInformation = 3,
|
||||
kHint = 4
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Information = 3,
|
||||
Hint = 4
|
||||
};
|
||||
|
||||
enum class DiagnosticTag
|
||||
{
|
||||
kUnnecessary = 1,
|
||||
kDeprecated = 2
|
||||
Unnecessary = 1,
|
||||
Deprecated = 2
|
||||
};
|
||||
|
||||
struct DiagnosticRelatedInformation
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace lsp::protocol
|
||||
|
||||
enum class TextDocumentSyncKind
|
||||
{
|
||||
kNone = 0,
|
||||
kFull = 1,
|
||||
kIncremental = 2
|
||||
None = 0,
|
||||
Full = 1,
|
||||
Incremental = 2
|
||||
};
|
||||
|
||||
struct TextDocumentSyncOptions
|
||||
|
||||
@@ -85,9 +85,9 @@ namespace lsp::protocol
|
||||
|
||||
enum class WatchKind
|
||||
{
|
||||
kCreate = 1,
|
||||
kChange = 2,
|
||||
kDelete = 4
|
||||
Create = 1,
|
||||
Change = 2,
|
||||
Delete = 4
|
||||
};
|
||||
|
||||
struct FileSystemWatcher
|
||||
@@ -103,9 +103,9 @@ namespace lsp::protocol
|
||||
|
||||
enum class FileChangeType
|
||||
{
|
||||
kCreated = 1,
|
||||
kChanged = 2,
|
||||
kDeleted = 3
|
||||
Created = 1,
|
||||
Changed = 2,
|
||||
Deleted = 3
|
||||
};
|
||||
|
||||
struct FileEvent
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace lsp::protocol
|
||||
|
||||
enum class InlayHintKind
|
||||
{
|
||||
kType = 1,
|
||||
kParameter = 2
|
||||
Type = 1,
|
||||
Parameter = 2
|
||||
};
|
||||
|
||||
struct InlayHint
|
||||
|
||||
@@ -5,22 +5,22 @@ namespace lsp::protocol
|
||||
{
|
||||
enum class ErrorCodes : int
|
||||
{
|
||||
kParseError = -32700,
|
||||
kInvalidRequest = -32600,
|
||||
kMethodNotFound = -32601,
|
||||
kInvalidParams = -32602,
|
||||
kInternalError = -32603,
|
||||
ParseError = -32700,
|
||||
InvalidRequest = -32600,
|
||||
MethodNotFound = -32601,
|
||||
InvalidParams = -32602,
|
||||
InternalError = -32603,
|
||||
|
||||
kJsonrpcReservedErrorRangeStart = -32099,
|
||||
kServerNotInitialized = -32002,
|
||||
kUnknownErrorCode = -32001,
|
||||
kJsonrpcReservedErrorRangeEnd = -32000,
|
||||
kLspReservedErrorRangeStart = -32899,
|
||||
kRequestFailed = -32803,
|
||||
kServerCancelled = -32802,
|
||||
kContentModified = -32801,
|
||||
kRequestCancelled = -32800,
|
||||
kLspReservedErrorRangeEnd = -32800
|
||||
JsonrpcReservedErrorRangeStart = -32099,
|
||||
ServerNotInitialized = -32002,
|
||||
UnknownErrorCode = -32001,
|
||||
JsonrpcReservedErrorRangeEnd = -32000,
|
||||
LspReservedErrorRangeStart = -32899,
|
||||
RequestFailed = -32803,
|
||||
ServerCancelled = -32802,
|
||||
ContentModified = -32801,
|
||||
RequestCancelled = -32800,
|
||||
LspReservedErrorRangeEnd = -32800
|
||||
};
|
||||
|
||||
struct Message
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace lsp::protocol
|
||||
{
|
||||
enum class PrepareSupportDefaultBehavior
|
||||
{
|
||||
kIdentifier = 1
|
||||
Identifier = 1
|
||||
};
|
||||
|
||||
// Rename
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace lsp::protocol
|
||||
|
||||
enum class SignatureHelpTriggerKind
|
||||
{
|
||||
kInvoked = 1,
|
||||
kTriggerCharacter = 2,
|
||||
kContentChange = 3
|
||||
Invoked = 1,
|
||||
TriggerCharacter = 2,
|
||||
ContentChange = 3
|
||||
};
|
||||
|
||||
struct ParammeterInformation
|
||||
|
||||
@@ -8,32 +8,32 @@ namespace lsp::protocol
|
||||
{
|
||||
enum class SymbolKind
|
||||
{
|
||||
kFile = 1,
|
||||
kModule = 2,
|
||||
kNamespace = 3,
|
||||
kPackage = 4,
|
||||
kClass = 5,
|
||||
kMethod = 6,
|
||||
kProperty = 7,
|
||||
kField = 8,
|
||||
kConstructor = 9,
|
||||
kEnum = 10,
|
||||
kInterface = 11,
|
||||
kFunction = 12,
|
||||
kVariable = 13,
|
||||
kConstant = 14,
|
||||
kString = 15,
|
||||
kNumber = 16,
|
||||
kBoolean = 17,
|
||||
kArray = 18,
|
||||
kObject = 19,
|
||||
kKey = 20,
|
||||
kNull = 21,
|
||||
kEnumMember = 22,
|
||||
kStruct = 23,
|
||||
kEvent = 24,
|
||||
kOperator = 25,
|
||||
kTypeParameter = 26
|
||||
File = 1,
|
||||
Module = 2,
|
||||
Namespace = 3,
|
||||
Package = 4,
|
||||
Class = 5,
|
||||
Method = 6,
|
||||
Property = 7,
|
||||
Field = 8,
|
||||
Constructor = 9,
|
||||
Enum = 10,
|
||||
Interface = 11,
|
||||
Function = 12,
|
||||
Variable = 13,
|
||||
Constant = 14,
|
||||
String = 15,
|
||||
Number = 16,
|
||||
Boolean = 17,
|
||||
Array = 18,
|
||||
Object = 19,
|
||||
Key = 20,
|
||||
Null = 21,
|
||||
EnumMember = 22,
|
||||
Struct = 23,
|
||||
Event = 24,
|
||||
Operator = 25,
|
||||
TypeParameter = 26
|
||||
};
|
||||
|
||||
enum class SymbolTag
|
||||
|
||||
Reference in New Issue
Block a user