github.com/tiagovtristao/plz@v13.4.0+incompatible/tools/build_langserver/lsp/enums.go (about) 1 package lsp 2 3 // CompletionItemKind indicate a completion entry 4 type CompletionItemKind int 5 6 // List of CompletionItemKind mapped to respective integer values 7 const ( 8 Text CompletionItemKind = 1 9 Method CompletionItemKind = 2 10 Function CompletionItemKind = 3 11 Field CompletionItemKind = 4 12 Variable CompletionItemKind = 6 13 Module CompletionItemKind = 9 14 Property CompletionItemKind = 10 15 Unit CompletionItemKind = 11 16 Value CompletionItemKind = 12 17 Keyword CompletionItemKind = 14 18 File CompletionItemKind = 17 19 Reference CompletionItemKind = 18 20 Folder CompletionItemKind = 19 21 Operator CompletionItemKind = 24 22 ) 23 24 // DiagnosticSeverity type is for different kind of supported diagnostic severities 25 type DiagnosticSeverity int 26 27 // List of DiagnosticSeverity mapped to respective integer values 28 const ( 29 Error DiagnosticSeverity = 1 30 Warning DiagnosticSeverity = 2 31 Information DiagnosticSeverity = 3 32 Hint DiagnosticSeverity = 4 33 ) 34 35 // TextDocumentSyncKind defines how the host (editor) should sync document changes to the language server. 36 type TextDocumentSyncKind int 37 38 // List of TextDocumentSyncKind mapped to respective integer values 39 const ( 40 SyncNone TextDocumentSyncKind = 0 41 SyncFull TextDocumentSyncKind = 1 42 SyncIncremental TextDocumentSyncKind = 2 43 ) 44 45 // CompletionTriggerKind defines how a completion was triggered 46 type CompletionTriggerKind int 47 48 const ( 49 // Invoked means Completion was triggered by typing an identifier (24x7 code 50 // complete), manual invocation (e.g Ctrl+Space) or via API. 51 Invoked CompletionItemKind = 1 52 53 // TriggerCharacter means Completion was triggered by a trigger character specified by 54 //the `triggerCharacters` properties of the `CompletionRegistrationOptions`. 55 TriggerCharacter CompletionItemKind = 2 56 57 // TriggerForIncompleteCompletions was re-triggered as the current 58 // completion list is incomplete. 59 TriggerForIncompleteCompletions CompletionItemKind = 3 60 ) 61 62 // InsertTextFormat defines whether the insert text in a completion item should be interpreted as 63 // plain text or a snippet. 64 type InsertTextFormat int 65 66 const ( 67 // ITFPlainText The primary text to be inserted is treated as a plain string. 68 ITFPlainText InsertTextFormat = 1 69 // ITFSnippet is the primary text to be inserted is treated as a snippet. 70 ITFSnippet InsertTextFormat = 2 71 ) 72 73 // TextDocumentSaveReason Represents reasons why a text document is saved. 74 type TextDocumentSaveReason int 75 76 // Represents reasons why a text document is saved. 77 const ( 78 Manual TextDocumentSaveReason = 1 79 AfterDelay TextDocumentSaveReason = 2 80 FocusOut TextDocumentSaveReason = 3 81 )