|
| 1 | +// Python Tools for Visual Studio |
| 2 | +// Copyright(c) Microsoft Corporation |
| 3 | +// All rights reserved. |
| 4 | +// |
| 5 | +// Licensed under the Apache License, Version 2.0 (the License); you may not use |
| 6 | +// this file except in compliance with the License. You may obtain a copy of the |
| 7 | +// License at http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS |
| 10 | +// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY |
| 11 | +// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
| 12 | +// MERCHANTABLITY OR NON-INFRINGEMENT. |
| 13 | +// |
| 14 | +// See the Apache Version 2.0 License for specific language governing |
| 15 | +// permissions and limitations under the License. |
| 16 | + |
| 17 | +using System; |
| 18 | + |
| 19 | +namespace Microsoft.PythonTools.Analysis.LanguageServer { |
| 20 | + public sealed class SerializeAsAttribute : Attribute { |
| 21 | + public object Value { get; } |
| 22 | + |
| 23 | + public SerializeAsAttribute(object value) { |
| 24 | + Value = value; |
| 25 | + } |
| 26 | + } |
| 27 | + |
| 28 | + public enum TraceLevel { |
| 29 | + [SerializeAs("off")] |
| 30 | + Off, |
| 31 | + [SerializeAs("messages")] |
| 32 | + Messages, |
| 33 | + [SerializeAs("verbose")] |
| 34 | + Verbose |
| 35 | + } |
| 36 | + |
| 37 | + public enum SymbolKind { |
| 38 | + None = 0, |
| 39 | + File = 1, |
| 40 | + Module = 2, |
| 41 | + Namespace = 3, |
| 42 | + Package = 4, |
| 43 | + Class = 5, |
| 44 | + Method = 6, |
| 45 | + Property = 7, |
| 46 | + Field = 8, |
| 47 | + Constructor = 9, |
| 48 | + Enum = 10, |
| 49 | + Interface = 11, |
| 50 | + Function = 12, |
| 51 | + Variable = 13, |
| 52 | + Constant = 14, |
| 53 | + String = 15, |
| 54 | + Number = 16, |
| 55 | + Boolean = 17, |
| 56 | + Array = 18, |
| 57 | + Object = 19, |
| 58 | + Key = 20, |
| 59 | + Null = 21, |
| 60 | + EnumMember = 22, |
| 61 | + Struct = 23, |
| 62 | + Event = 24, |
| 63 | + Operator = 25, |
| 64 | + TypeParameter = 26 |
| 65 | + } |
| 66 | + |
| 67 | + public enum TextDocumentSyncKind : int { |
| 68 | + None = 0, |
| 69 | + Full = 1, |
| 70 | + Incremental = 2 |
| 71 | + } |
| 72 | + |
| 73 | + public enum MessageType : int { |
| 74 | + /// <summary> |
| 75 | + /// General language server output relevant to the user |
| 76 | + /// such as information on Python interpreter type. |
| 77 | + /// Does not conform to LSP definitions, Python LS specific. |
| 78 | + /// </summary> |
| 79 | + _General = 0, |
| 80 | + |
| 81 | + /// <summary> |
| 82 | + /// Language server errors. |
| 83 | + /// </summary> |
| 84 | + Error = 1, |
| 85 | + |
| 86 | + /// <summary> |
| 87 | + /// Language server warnings. |
| 88 | + /// </summary> |
| 89 | + Warning = 2, |
| 90 | + |
| 91 | + /// <summary> |
| 92 | + /// Language server internal information. |
| 93 | + /// </summary> |
| 94 | + Info = 3, |
| 95 | + |
| 96 | + /// <summary> |
| 97 | + /// Language server log-level diagnostic messages. |
| 98 | + /// </summary> |
| 99 | + Log = 4 |
| 100 | + } |
| 101 | + |
| 102 | + public enum FileChangeType : int { |
| 103 | + Created = 1, |
| 104 | + Changed = 2, |
| 105 | + Deleted = 3 |
| 106 | + } |
| 107 | + |
| 108 | + public enum WatchKind : int { |
| 109 | + Create = 1, |
| 110 | + Change = 2, |
| 111 | + Delete = 4 |
| 112 | + } |
| 113 | + |
| 114 | + public enum TextDocumentSaveReason : int { |
| 115 | + Manual = 1, |
| 116 | + AfterDelay = 2, |
| 117 | + FocusOut = 3 |
| 118 | + } |
| 119 | + |
| 120 | + public enum CompletionTriggerKind : int { |
| 121 | + Invoked = 1, |
| 122 | + TriggerCharacter = 2 |
| 123 | + } |
| 124 | + |
| 125 | + public enum InsertTextFormat : int { |
| 126 | + PlainText = 1, |
| 127 | + Snippet = 2 |
| 128 | + } |
| 129 | + |
| 130 | + public enum CompletionItemKind : int { |
| 131 | + None = 0, |
| 132 | + Text = 1, |
| 133 | + Method = 2, |
| 134 | + Function = 3, |
| 135 | + Constructor = 4, |
| 136 | + Field = 5, |
| 137 | + Variable = 6, |
| 138 | + Class = 7, |
| 139 | + Interface = 8, |
| 140 | + Module = 9, |
| 141 | + Property = 10, |
| 142 | + Unit = 11, |
| 143 | + Value = 12, |
| 144 | + Enum = 13, |
| 145 | + Keyword = 14, |
| 146 | + Snippet = 15, |
| 147 | + Color = 16, |
| 148 | + File = 17, |
| 149 | + Reference = 18, |
| 150 | + Folder = 19, |
| 151 | + EnumMember = 20, |
| 152 | + Constant = 21, |
| 153 | + Struct = 22, |
| 154 | + Event = 23, |
| 155 | + Operator = 24, |
| 156 | + TypeParameter = 25 |
| 157 | + } |
| 158 | + |
| 159 | + public enum DocumentHighlightKind : int { |
| 160 | + Text = 1, |
| 161 | + Read = 2, |
| 162 | + Write = 3 |
| 163 | + } |
| 164 | + |
| 165 | + // Not in the LSP spec. |
| 166 | + public enum ReferenceKind : int { |
| 167 | + Definition = 1, |
| 168 | + Reference = 2, |
| 169 | + Value = 3 |
| 170 | + } |
| 171 | +} |
0 commit comments