protocol.lua (58596B)
1 --- @diagnostic disable: duplicate-doc-alias 2 3 ---@param tbl table<string, string|number> 4 local function get_value_set(tbl) 5 local value_set = {} 6 for _, v in pairs(tbl) do 7 table.insert(value_set, v) 8 end 9 table.sort(value_set) 10 return value_set 11 end 12 13 local sysname = vim.uv.os_uname().sysname 14 15 --- @class vim.lsp.protocol.constants 16 --- @nodoc 17 local constants = { 18 DiagnosticSeverity = { 19 -- Reports an error. 20 Error = 1, 21 -- Reports a warning. 22 Warning = 2, 23 -- Reports an information. 24 Information = 3, 25 -- Reports a hint. 26 Hint = 4, 27 }, 28 29 DiagnosticTag = { 30 -- Unused or unnecessary code 31 Unnecessary = 1, 32 -- Deprecated or obsolete code 33 Deprecated = 2, 34 }, 35 36 MessageType = { 37 -- An error message. 38 Error = 1, 39 -- A warning message. 40 Warning = 2, 41 -- An information message. 42 Info = 3, 43 -- A log message. 44 Log = 4, 45 -- A debug message. 46 Debug = 5, 47 }, 48 49 -- The file event type. 50 FileChangeType = { 51 -- The file got created. 52 Created = 1, 53 -- The file got changed. 54 Changed = 2, 55 -- The file got deleted. 56 Deleted = 3, 57 }, 58 59 -- The kind of a completion entry. 60 CompletionItemKind = { 61 Text = 1, 62 Method = 2, 63 Function = 3, 64 Constructor = 4, 65 Field = 5, 66 Variable = 6, 67 Class = 7, 68 Interface = 8, 69 Module = 9, 70 Property = 10, 71 Unit = 11, 72 Value = 12, 73 Enum = 13, 74 Keyword = 14, 75 Snippet = 15, 76 Color = 16, 77 File = 17, 78 Reference = 18, 79 Folder = 19, 80 EnumMember = 20, 81 Constant = 21, 82 Struct = 22, 83 Event = 23, 84 Operator = 24, 85 TypeParameter = 25, 86 }, 87 88 -- How a completion was triggered 89 CompletionTriggerKind = { 90 -- Completion was triggered by typing an identifier (24x7 code 91 -- complete), manual invocation (e.g Ctrl+Space) or via API. 92 Invoked = 1, 93 -- Completion was triggered by a trigger character specified by 94 -- the `triggerCharacters` properties of the `CompletionRegistrationOptions`. 95 TriggerCharacter = 2, 96 -- Completion was re-triggered as the current completion list is incomplete. 97 TriggerForIncompleteCompletions = 3, 98 }, 99 100 -- Completion item tags are extra annotations that tweak the rendering of a 101 -- completion item 102 CompletionTag = { 103 -- Render a completion as obsolete, usually using a strike-out. 104 Deprecated = 1, 105 }, 106 107 -- A document highlight kind. 108 DocumentHighlightKind = { 109 -- A textual occurrence. 110 Text = 1, 111 -- Read-access of a symbol, like reading a variable. 112 Read = 2, 113 -- Write-access of a symbol, like writing to a variable. 114 Write = 3, 115 }, 116 117 -- A symbol kind. 118 SymbolKind = { 119 File = 1, 120 Module = 2, 121 Namespace = 3, 122 Package = 4, 123 Class = 5, 124 Method = 6, 125 Property = 7, 126 Field = 8, 127 Constructor = 9, 128 Enum = 10, 129 Interface = 11, 130 Function = 12, 131 Variable = 13, 132 Constant = 14, 133 String = 15, 134 Number = 16, 135 Boolean = 17, 136 Array = 18, 137 Object = 19, 138 Key = 20, 139 Null = 21, 140 EnumMember = 22, 141 Struct = 23, 142 Event = 24, 143 Operator = 25, 144 TypeParameter = 26, 145 }, 146 147 -- Extra annotations that tweak the rendering of a symbol. 148 SymbolTag = { 149 Deprecated = 1, 150 }, 151 152 -- Represents reasons why a text document is saved. 153 TextDocumentSaveReason = { 154 -- Manually triggered, e.g. by the user pressing save, by starting debugging, 155 -- or by an API call. 156 Manual = 1, 157 -- Automatic after a delay. 158 AfterDelay = 2, 159 -- When the editor lost focus. 160 FocusOut = 3, 161 }, 162 163 ErrorCodes = { 164 -- Defined by JSON RPC 165 ParseError = -32700, 166 InvalidRequest = -32600, 167 MethodNotFound = -32601, 168 InvalidParams = -32602, 169 InternalError = -32603, 170 ServerNotInitialized = -32002, 171 UnknownErrorCode = -32001, 172 -- Defined by the protocol. 173 RequestCancelled = -32800, 174 ContentModified = -32801, 175 ServerCancelled = -32802, 176 RequestFailed = -32803, 177 }, 178 179 -- Describes the content type that a client supports in various 180 -- result literals like `Hover`, `ParameterInfo` or `CompletionItem`. 181 -- 182 -- Please note that `MarkupKinds` must not start with a `$`. This kinds 183 -- are reserved for internal usage. 184 MarkupKind = { 185 -- Plain text is supported as a content format 186 PlainText = 'plaintext', 187 -- Markdown is supported as a content format 188 Markdown = 'markdown', 189 }, 190 191 ResourceOperationKind = { 192 -- Supports creating new files and folders. 193 Create = 'create', 194 -- Supports renaming existing files and folders. 195 Rename = 'rename', 196 -- Supports deleting existing files and folders. 197 Delete = 'delete', 198 }, 199 200 FailureHandlingKind = { 201 -- Applying the workspace change is simply aborted if one of the changes provided 202 -- fails. All operations executed before the failing operation stay executed. 203 Abort = 'abort', 204 -- All operations are executed transactionally. That means they either all 205 -- succeed or no changes at all are applied to the workspace. 206 Transactional = 'transactional', 207 -- If the workspace edit contains only textual file changes they are executed transactionally. 208 -- If resource changes (create, rename or delete file) are part of the change the failure 209 -- handling strategy is abort. 210 TextOnlyTransactional = 'textOnlyTransactional', 211 -- The client tries to undo the operations already executed. But there is no 212 -- guarantee that this succeeds. 213 Undo = 'undo', 214 }, 215 216 -- Known error codes for an `InitializeError`; 217 InitializeError = { 218 -- If the protocol version provided by the client can't be handled by the server. 219 -- @deprecated This initialize error got replaced by client capabilities. There is 220 -- no version handshake in version 3.0x 221 unknownProtocolVersion = 1, 222 }, 223 224 -- Defines how the host (editor) should sync document changes to the language server. 225 TextDocumentSyncKind = { 226 -- Documents should not be synced at all. 227 None = 0, 228 -- Documents are synced by always sending the full content 229 -- of the document. 230 Full = 1, 231 -- Documents are synced by sending the full content on open. 232 -- After that only incremental updates to the document are 233 -- send. 234 Incremental = 2, 235 }, 236 237 WatchKind = { 238 -- Interested in create events. 239 Create = 1, 240 -- Interested in change events 241 Change = 2, 242 -- Interested in delete events 243 Delete = 4, 244 }, 245 246 -- Defines whether the insert text in a completion item should be interpreted as 247 -- plain text or a snippet. 248 InsertTextFormat = { 249 -- The primary text to be inserted is treated as a plain string. 250 PlainText = 1, 251 -- The primary text to be inserted is treated as a snippet. 252 -- 253 -- A snippet can define tab stops and placeholders with `$1`, `$2` 254 -- and `${3:foo};`. `$0` defines the final tab stop, it defaults to 255 -- the end of the snippet. Placeholders with equal identifiers are linked, 256 -- that is typing in one will update others too. 257 Snippet = 2, 258 }, 259 260 -- A set of predefined code action kinds 261 CodeActionKind = { 262 -- Empty kind. 263 Empty = '', 264 -- Base kind for quickfix actions 265 QuickFix = 'quickfix', 266 -- Base kind for refactoring actions 267 Refactor = 'refactor', 268 -- Base kind for refactoring extraction actions 269 -- 270 -- Example extract actions: 271 -- 272 -- - Extract method 273 -- - Extract function 274 -- - Extract variable 275 -- - Extract interface from class 276 -- - ... 277 RefactorExtract = 'refactor.extract', 278 -- Base kind for refactoring inline actions 279 -- 280 -- Example inline actions: 281 -- 282 -- - Inline function 283 -- - Inline variable 284 -- - Inline constant 285 -- - ... 286 RefactorInline = 'refactor.inline', 287 -- Base kind for refactoring rewrite actions 288 -- 289 -- Example rewrite actions: 290 -- 291 -- - Convert JavaScript function to class 292 -- - Add or remove parameter 293 -- - Encapsulate field 294 -- - Make method static 295 -- - Move method to base class 296 -- - ... 297 RefactorRewrite = 'refactor.rewrite', 298 -- Base kind for source actions 299 -- 300 -- Source code actions apply to the entire file. 301 Source = 'source', 302 -- Base kind for an organize imports source action 303 SourceOrganizeImports = 'source.organizeImports', 304 }, 305 -- The reason why code actions were requested. 306 CodeActionTriggerKind = { 307 -- Code actions were explicitly requested by the user or by an extension. 308 Invoked = 1, 309 -- Code actions were requested automatically. 310 -- 311 -- This typically happens when current selection in a file changes, but can 312 -- also be triggered when file content changes. 313 Automatic = 2, 314 }, 315 InlineCompletionTriggerKind = { 316 -- Completion was triggered explicitly by a user gesture. 317 -- Return multiple completion items to enable cycling through them. 318 Invoked = 1, 319 -- Completion was triggered automatically while editing. 320 -- It is sufficient to return a single completion item in this case. 321 Automatic = 2, 322 }, 323 } 324 325 --- Protocol for the Microsoft Language Server Protocol (mslsp) 326 --- @class vim.lsp.protocol : vim.lsp.protocol.constants 327 --- @nodoc 328 local protocol = {} 329 330 --- @diagnostic disable:no-unknown 331 for k1, v1 in pairs(vim.deepcopy(constants, true)) do 332 for _, k2 in ipairs(vim.tbl_keys(v1)) do 333 local v2 = v1[k2] 334 v1[v2] = k2 335 end 336 protocol[k1] = v1 337 end 338 --- @diagnostic enable:no-unknown 339 340 --- Gets a new ClientCapabilities object describing the LSP client 341 --- capabilities. 342 --- @return lsp.ClientCapabilities 343 function protocol.make_client_capabilities() 344 ---@type lsp.ClientCapabilities 345 return { 346 general = { 347 positionEncodings = { 348 'utf-8', 349 'utf-16', 350 'utf-32', 351 }, 352 }, 353 textDocument = { 354 diagnostic = { 355 dynamicRegistration = true, 356 tagSupport = { 357 valueSet = get_value_set(constants.DiagnosticTag), 358 }, 359 dataSupport = true, 360 relatedInformation = true, 361 relatedDocumentSupport = true, 362 }, 363 inlayHint = { 364 dynamicRegistration = true, 365 resolveSupport = { 366 properties = { 367 'textEdits', 368 'tooltip', 369 'location', 370 'command', 371 }, 372 }, 373 }, 374 semanticTokens = { 375 dynamicRegistration = false, 376 tokenTypes = { 377 'namespace', 378 'type', 379 'class', 380 'enum', 381 'interface', 382 'struct', 383 'typeParameter', 384 'parameter', 385 'variable', 386 'property', 387 'enumMember', 388 'event', 389 'function', 390 'method', 391 'macro', 392 'keyword', 393 'modifier', 394 'comment', 395 'string', 396 'number', 397 'regexp', 398 'operator', 399 'decorator', 400 }, 401 tokenModifiers = { 402 'declaration', 403 'definition', 404 'readonly', 405 'static', 406 'deprecated', 407 'abstract', 408 'async', 409 'modification', 410 'documentation', 411 'defaultLibrary', 412 }, 413 formats = { 'relative' }, 414 requests = { 415 range = true, 416 full = { delta = true }, 417 }, 418 419 overlappingTokenSupport = true, 420 multilineTokenSupport = true, 421 serverCancelSupport = false, 422 augmentsSyntaxTokens = true, 423 }, 424 synchronization = { 425 dynamicRegistration = false, 426 427 willSave = true, 428 willSaveWaitUntil = true, 429 430 -- Send textDocument/didSave after saving (BufWritePost) 431 didSave = true, 432 }, 433 codeAction = { 434 dynamicRegistration = true, 435 436 codeActionLiteralSupport = { 437 codeActionKind = { 438 valueSet = get_value_set(constants.CodeActionKind), 439 }, 440 }, 441 isPreferredSupport = true, 442 dataSupport = true, 443 resolveSupport = { 444 properties = { 'edit', 'command' }, 445 }, 446 disabledSupport = true, 447 honorsChangeAnnotations = true, 448 }, 449 codeLens = { 450 dynamicRegistration = false, 451 resolveSupport = { 452 properties = { 'command' }, 453 }, 454 }, 455 foldingRange = { 456 dynamicRegistration = false, 457 lineFoldingOnly = true, 458 foldingRangeKind = { 459 valueSet = { 'comment', 'imports', 'region' }, 460 }, 461 foldingRange = { 462 collapsedText = true, 463 }, 464 }, 465 formatting = { 466 dynamicRegistration = true, 467 }, 468 rangeFormatting = { 469 dynamicRegistration = true, 470 rangesSupport = true, 471 }, 472 completion = { 473 dynamicRegistration = false, 474 completionItem = { 475 snippetSupport = true, 476 commitCharactersSupport = false, 477 preselectSupport = false, 478 deprecatedSupport = true, 479 documentationFormat = { constants.MarkupKind.Markdown, constants.MarkupKind.PlainText }, 480 insertReplaceSupport = true, 481 resolveSupport = { 482 properties = { 483 'additionalTextEdits', 484 'command', 485 }, 486 }, 487 tagSupport = { 488 valueSet = get_value_set(constants.CompletionTag), 489 }, 490 }, 491 completionItemKind = { 492 valueSet = get_value_set(constants.CompletionItemKind), 493 }, 494 completionList = { 495 itemDefaults = { 496 'editRange', 497 'insertTextFormat', 498 'insertTextMode', 499 'data', 500 }, 501 }, 502 contextSupport = true, 503 }, 504 declaration = { 505 linkSupport = true, 506 }, 507 definition = { 508 linkSupport = true, 509 dynamicRegistration = true, 510 }, 511 documentLink = { 512 dynamicRegistration = false, 513 tooltipSupport = false, 514 }, 515 implementation = { 516 linkSupport = true, 517 }, 518 inlineCompletion = { 519 dynamicRegistration = false, 520 }, 521 typeDefinition = { 522 linkSupport = true, 523 }, 524 hover = { 525 dynamicRegistration = true, 526 contentFormat = { constants.MarkupKind.Markdown, constants.MarkupKind.PlainText }, 527 }, 528 signatureHelp = { 529 dynamicRegistration = false, 530 signatureInformation = { 531 activeParameterSupport = true, 532 noActiveParameterSupport = true, 533 documentationFormat = { constants.MarkupKind.Markdown, constants.MarkupKind.PlainText }, 534 parameterInformation = { 535 labelOffsetSupport = true, 536 }, 537 }, 538 }, 539 references = { 540 dynamicRegistration = false, 541 }, 542 documentHighlight = { 543 dynamicRegistration = false, 544 }, 545 documentSymbol = { 546 dynamicRegistration = false, 547 symbolKind = { 548 valueSet = get_value_set(constants.SymbolKind), 549 }, 550 hierarchicalDocumentSymbolSupport = true, 551 tagSupport = { 552 valueSet = get_value_set(constants.SymbolTag), 553 }, 554 }, 555 rename = { 556 dynamicRegistration = true, 557 prepareSupport = true, 558 honorsChangeAnnotations = true, 559 }, 560 publishDiagnostics = { 561 relatedInformation = true, 562 tagSupport = { 563 valueSet = get_value_set(constants.DiagnosticTag), 564 }, 565 dataSupport = true, 566 }, 567 callHierarchy = { 568 dynamicRegistration = false, 569 }, 570 colorProvider = { 571 dynamicRegistration = true, 572 }, 573 selectionRange = { 574 dynamicRegistration = false, 575 }, 576 linkedEditingRange = { 577 dynamicRegistration = false, 578 }, 579 onTypeFormatting = { 580 dynamicRegistration = false, 581 }, 582 }, 583 workspace = { 584 symbol = { 585 dynamicRegistration = false, 586 symbolKind = { 587 valueSet = get_value_set(constants.SymbolKind), 588 }, 589 }, 590 configuration = true, 591 didChangeConfiguration = { 592 dynamicRegistration = false, 593 }, 594 workspaceFolders = true, 595 applyEdit = true, 596 workspaceEdit = { 597 resourceOperations = { 'rename', 'create', 'delete' }, 598 normalizesLineEndings = true, 599 changeAnnotationSupport = { groupsOnLabel = true }, 600 }, 601 semanticTokens = { 602 refreshSupport = true, 603 }, 604 didChangeWatchedFiles = { 605 -- TODO(lewis6991): do not advertise didChangeWatchedFiles on Linux 606 -- or BSD since all the current backends are too limited. 607 -- Ref: #27807, #28058, #23291, #26520 608 dynamicRegistration = sysname == 'Darwin' or sysname == 'Windows_NT', 609 relativePatternSupport = true, 610 }, 611 codeLens = { 612 refreshSupport = true, 613 }, 614 inlayHint = { 615 refreshSupport = true, 616 }, 617 diagnostics = { 618 refreshSupport = true, 619 }, 620 fileOperations = { 621 dynamicRegistration = false, 622 didCreate = false, 623 willCreate = false, 624 didRename = false, 625 willRename = false, 626 didDelete = false, 627 willDelete = false, 628 }, 629 }, 630 experimental = nil, 631 window = { 632 workDoneProgress = true, 633 showMessage = { 634 messageActionItem = { 635 additionalPropertiesSupport = true, 636 }, 637 }, 638 showDocument = { 639 support = true, 640 }, 641 }, 642 } 643 end 644 645 --- Creates a normalized object describing LSP server capabilities. 646 ---@param server_capabilities table Table of capabilities supported by the server 647 ---@return lsp.ServerCapabilities|nil : Normalized table of capabilities 648 function protocol.resolve_capabilities(server_capabilities) 649 local TextDocumentSyncKind = protocol.TextDocumentSyncKind ---@type table<string|number, string|number> 650 local textDocumentSync = server_capabilities.textDocumentSync 651 if textDocumentSync == nil then 652 -- Defaults if omitted. 653 server_capabilities.textDocumentSync = { 654 openClose = false, 655 change = TextDocumentSyncKind.None, 656 willSave = false, 657 willSaveWaitUntil = false, 658 save = { 659 includeText = false, 660 }, 661 } 662 elseif type(textDocumentSync) == 'number' then 663 -- Backwards compatibility 664 if not TextDocumentSyncKind[textDocumentSync] then 665 vim.notify('Invalid server TextDocumentSyncKind for textDocumentSync', vim.log.levels.ERROR) 666 return nil 667 end 668 server_capabilities.textDocumentSync = { 669 openClose = true, 670 change = textDocumentSync, 671 willSave = false, 672 willSaveWaitUntil = false, 673 save = { 674 includeText = false, 675 }, 676 } 677 elseif type(textDocumentSync) ~= 'table' then 678 vim.notify( 679 string.format('Invalid type for textDocumentSync: %q', type(textDocumentSync)), 680 vim.log.levels.ERROR 681 ) 682 return nil 683 end 684 return server_capabilities 685 end 686 687 -- Generated by gen_lsp.lua, keep at end of file. 688 --- LSP Request (direction: clientToServer) 689 --- @alias vim.lsp.protocol.Method.ClientToServer.Request 690 --- | 'callHierarchy/incomingCalls', 691 --- | 'callHierarchy/outgoingCalls', 692 --- | 'codeAction/resolve', 693 --- | 'codeLens/resolve', 694 --- | 'completionItem/resolve', 695 --- | 'documentLink/resolve', 696 --- | 'initialize', 697 --- | 'inlayHint/resolve', 698 --- | 'shutdown', 699 --- | 'textDocument/codeAction', 700 --- | 'textDocument/codeLens', 701 --- | 'textDocument/colorPresentation', 702 --- | 'textDocument/completion', 703 --- | 'textDocument/declaration', 704 --- | 'textDocument/definition', 705 --- | 'textDocument/diagnostic', 706 --- | 'textDocument/documentColor', 707 --- | 'textDocument/documentHighlight', 708 --- | 'textDocument/documentLink', 709 --- | 'textDocument/documentSymbol', 710 --- | 'textDocument/foldingRange', 711 --- | 'textDocument/formatting', 712 --- | 'textDocument/hover', 713 --- | 'textDocument/implementation', 714 --- | 'textDocument/inlayHint', 715 --- | 'textDocument/inlineCompletion', 716 --- | 'textDocument/inlineValue', 717 --- | 'textDocument/linkedEditingRange', 718 --- | 'textDocument/moniker', 719 --- | 'textDocument/onTypeFormatting', 720 --- | 'textDocument/prepareCallHierarchy', 721 --- | 'textDocument/prepareRename', 722 --- | 'textDocument/prepareTypeHierarchy', 723 --- | 'textDocument/rangeFormatting', 724 --- | 'textDocument/rangesFormatting', 725 --- | 'textDocument/references', 726 --- | 'textDocument/rename', 727 --- | 'textDocument/selectionRange', 728 --- | 'textDocument/semanticTokens/full', 729 --- | 'textDocument/semanticTokens/full/delta', 730 --- | 'textDocument/semanticTokens/range', 731 --- | 'textDocument/signatureHelp', 732 --- | 'textDocument/typeDefinition', 733 --- | 'textDocument/willSaveWaitUntil', 734 --- | 'typeHierarchy/subtypes', 735 --- | 'typeHierarchy/supertypes', 736 --- | 'workspaceSymbol/resolve', 737 --- | 'workspace/diagnostic', 738 --- | 'workspace/executeCommand', 739 --- | 'workspace/symbol', 740 --- | 'workspace/textDocumentContent', 741 --- | 'workspace/willCreateFiles', 742 --- | 'workspace/willDeleteFiles', 743 --- | 'workspace/willRenameFiles', 744 745 --- LSP Notification (direction: clientToServer) 746 --- @alias vim.lsp.protocol.Method.ClientToServer.Notification 747 --- | '$/cancelRequest', 748 --- | '$/progress', 749 --- | '$/setTrace', 750 --- | 'exit', 751 --- | 'initialized', 752 --- | 'notebookDocument/didChange', 753 --- | 'notebookDocument/didClose', 754 --- | 'notebookDocument/didOpen', 755 --- | 'notebookDocument/didSave', 756 --- | 'textDocument/didChange', 757 --- | 'textDocument/didClose', 758 --- | 'textDocument/didOpen', 759 --- | 'textDocument/didSave', 760 --- | 'textDocument/willSave', 761 --- | 'window/workDoneProgress/cancel', 762 --- | 'workspace/didChangeConfiguration', 763 --- | 'workspace/didChangeWatchedFiles', 764 --- | 'workspace/didChangeWorkspaceFolders', 765 --- | 'workspace/didCreateFiles', 766 --- | 'workspace/didDeleteFiles', 767 --- | 'workspace/didRenameFiles', 768 769 --- LSP Message (direction: clientToServer). 770 --- @alias vim.lsp.protocol.Method.ClientToServer 771 --- | vim.lsp.protocol.Method.ClientToServer.Request 772 --- | vim.lsp.protocol.Method.ClientToServer.Notification 773 774 --- LSP Request (direction: serverToClient) 775 --- @alias vim.lsp.protocol.Method.ServerToClient.Request 776 --- | 'client/registerCapability', 777 --- | 'client/unregisterCapability', 778 --- | 'window/showDocument', 779 --- | 'window/showMessageRequest', 780 --- | 'window/workDoneProgress/create', 781 --- | 'workspace/applyEdit', 782 --- | 'workspace/codeLens/refresh', 783 --- | 'workspace/configuration', 784 --- | 'workspace/diagnostic/refresh', 785 --- | 'workspace/foldingRange/refresh', 786 --- | 'workspace/inlayHint/refresh', 787 --- | 'workspace/inlineValue/refresh', 788 --- | 'workspace/semanticTokens/refresh', 789 --- | 'workspace/textDocumentContent/refresh', 790 --- | 'workspace/workspaceFolders', 791 792 --- LSP Notification (direction: serverToClient) 793 --- @alias vim.lsp.protocol.Method.ServerToClient.Notification 794 --- | '$/cancelRequest', 795 --- | '$/logTrace', 796 --- | '$/progress', 797 --- | 'telemetry/event', 798 --- | 'textDocument/publishDiagnostics', 799 --- | 'window/logMessage', 800 --- | 'window/showMessage', 801 802 --- LSP Message (direction: serverToClient). 803 --- @alias vim.lsp.protocol.Method.ServerToClient 804 --- | vim.lsp.protocol.Method.ServerToClient.Request 805 --- | vim.lsp.protocol.Method.ServerToClient.Notification 806 807 --- @alias vim.lsp.protocol.Method 808 --- | vim.lsp.protocol.Method.ClientToServer 809 --- | vim.lsp.protocol.Method.ServerToClient 810 811 -- Generated by gen_lsp.lua, keep at end of file. 812 --- @deprecated Use `vim.lsp.protocol.Method` instead. 813 --- @enum vim.lsp.protocol.Methods 814 --- @see https://microsoft.github.io/language-server-protocol/specification/#metaModel 815 --- LSP method names. 816 protocol.Methods = { 817 --- A request to resolve the incoming calls for a given `CallHierarchyItem`. 818 --- @since 3.16.0 819 callHierarchy_incomingCalls = 'callHierarchy/incomingCalls', 820 --- A request to resolve the outgoing calls for a given `CallHierarchyItem`. 821 --- @since 3.16.0 822 callHierarchy_outgoingCalls = 'callHierarchy/outgoingCalls', 823 --- The `client/registerCapability` request is sent from the server to the client to register a new capability 824 --- handler on the client side. 825 client_registerCapability = 'client/registerCapability', 826 --- The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability 827 --- handler on the client side. 828 client_unregisterCapability = 'client/unregisterCapability', 829 --- Request to resolve additional information for a given code action.The request's 830 --- parameter is of type {@link CodeAction} the response 831 --- is of type {@link CodeAction} or a Thenable that resolves to such. 832 codeAction_resolve = 'codeAction/resolve', 833 --- A request to resolve a command for a given code lens. 834 codeLens_resolve = 'codeLens/resolve', 835 --- Request to resolve additional information for a given completion item.The request's 836 --- parameter is of type {@link CompletionItem} the response 837 --- is of type {@link CompletionItem} or a Thenable that resolves to such. 838 completionItem_resolve = 'completionItem/resolve', 839 --- Request to resolve additional information for a given document link. The request's 840 --- parameter is of type {@link DocumentLink} the response 841 --- is of type {@link DocumentLink} or a Thenable that resolves to such. 842 documentLink_resolve = 'documentLink/resolve', 843 dollar_cancelRequest = '$/cancelRequest', 844 dollar_logTrace = '$/logTrace', 845 dollar_progress = '$/progress', 846 dollar_setTrace = '$/setTrace', 847 --- The exit event is sent from the client to the server to 848 --- ask the server to exit its process. 849 exit = 'exit', 850 --- The initialize request is sent from the client to the server. 851 --- It is sent once as the request after starting up the server. 852 --- The requests parameter is of type {@link InitializeParams} 853 --- the response if of type {@link InitializeResult} of a Thenable that 854 --- resolves to such. 855 initialize = 'initialize', 856 --- The initialized notification is sent from the client to the 857 --- server after the client is fully initialized and the server 858 --- is allowed to send requests from the server to the client. 859 initialized = 'initialized', 860 --- A request to resolve additional properties for an inlay hint. 861 --- The request's parameter is of type {@link InlayHint}, the response is 862 --- of type {@link InlayHint} or a Thenable that resolves to such. 863 --- @since 3.17.0 864 inlayHint_resolve = 'inlayHint/resolve', 865 notebookDocument_didChange = 'notebookDocument/didChange', 866 --- A notification sent when a notebook closes. 867 --- @since 3.17.0 868 notebookDocument_didClose = 'notebookDocument/didClose', 869 --- A notification sent when a notebook opens. 870 --- @since 3.17.0 871 notebookDocument_didOpen = 'notebookDocument/didOpen', 872 --- A notification sent when a notebook document is saved. 873 --- @since 3.17.0 874 notebookDocument_didSave = 'notebookDocument/didSave', 875 --- A shutdown request is sent from the client to the server. 876 --- It is sent once when the client decides to shutdown the 877 --- server. The only notification that is sent after a shutdown request 878 --- is the exit event. 879 shutdown = 'shutdown', 880 --- The telemetry event notification is sent from the server to the client to ask 881 --- the client to log telemetry data. 882 telemetry_event = 'telemetry/event', 883 --- A request to provide commands for the given text document and range. 884 textDocument_codeAction = 'textDocument/codeAction', 885 --- A request to provide code lens for the given text document. 886 textDocument_codeLens = 'textDocument/codeLens', 887 --- A request to list all presentation for a color. The request's 888 --- parameter is of type {@link ColorPresentationParams} the 889 --- response is of type {@link ColorInformation ColorInformation[]} or a Thenable 890 --- that resolves to such. 891 textDocument_colorPresentation = 'textDocument/colorPresentation', 892 --- Request to request completion at a given text document position. The request's 893 --- parameter is of type {@link TextDocumentPosition} the response 894 --- is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} 895 --- or a Thenable that resolves to such. 896 --- The request can delay the computation of the {@link CompletionItem.detail `detail`} 897 --- and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` 898 --- request. However, properties that are needed for the initial sorting and filtering, like `sortText`, 899 --- `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. 900 textDocument_completion = 'textDocument/completion', 901 --- A request to resolve the type definition locations of a symbol at a given text 902 --- document position. The request's parameter is of type {@link TextDocumentPositionParams} 903 --- the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} 904 --- or a Thenable that resolves to such. 905 textDocument_declaration = 'textDocument/declaration', 906 --- A request to resolve the definition location of a symbol at a given text 907 --- document position. The request's parameter is of type {@link TextDocumentPosition} 908 --- the response is of either type {@link Definition} or a typed array of 909 --- {@link DefinitionLink} or a Thenable that resolves to such. 910 textDocument_definition = 'textDocument/definition', 911 --- The document diagnostic request definition. 912 --- @since 3.17.0 913 textDocument_diagnostic = 'textDocument/diagnostic', 914 --- The document change notification is sent from the client to the server to signal 915 --- changes to a text document. 916 textDocument_didChange = 'textDocument/didChange', 917 --- The document close notification is sent from the client to the server when 918 --- the document got closed in the client. The document's truth now exists where 919 --- the document's uri points to (e.g. if the document's uri is a file uri the 920 --- truth now exists on disk). As with the open notification the close notification 921 --- is about managing the document's content. Receiving a close notification 922 --- doesn't mean that the document was open in an editor before. A close 923 --- notification requires a previous open notification to be sent. 924 textDocument_didClose = 'textDocument/didClose', 925 --- The document open notification is sent from the client to the server to signal 926 --- newly opened text documents. The document's truth is now managed by the client 927 --- and the server must not try to read the document's truth using the document's 928 --- uri. Open in this sense means it is managed by the client. It doesn't necessarily 929 --- mean that its content is presented in an editor. An open notification must not 930 --- be sent more than once without a corresponding close notification send before. 931 --- This means open and close notification must be balanced and the max open count 932 --- is one. 933 textDocument_didOpen = 'textDocument/didOpen', 934 --- The document save notification is sent from the client to the server when 935 --- the document got saved in the client. 936 textDocument_didSave = 'textDocument/didSave', 937 --- A request to list all color symbols found in a given text document. The request's 938 --- parameter is of type {@link DocumentColorParams} the 939 --- response is of type {@link ColorInformation ColorInformation[]} or a Thenable 940 --- that resolves to such. 941 textDocument_documentColor = 'textDocument/documentColor', 942 --- Request to resolve a {@link DocumentHighlight} for a given 943 --- text document position. The request's parameter is of type {@link TextDocumentPosition} 944 --- the request response is an array of type {@link DocumentHighlight} 945 --- or a Thenable that resolves to such. 946 textDocument_documentHighlight = 'textDocument/documentHighlight', 947 --- A request to provide document links 948 textDocument_documentLink = 'textDocument/documentLink', 949 --- A request to list all symbols found in a given text document. The request's 950 --- parameter is of type {@link TextDocumentIdentifier} the 951 --- response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable 952 --- that resolves to such. 953 textDocument_documentSymbol = 'textDocument/documentSymbol', 954 --- A request to provide folding ranges in a document. The request's 955 --- parameter is of type {@link FoldingRangeParams}, the 956 --- response is of type {@link FoldingRangeList} or a Thenable 957 --- that resolves to such. 958 textDocument_foldingRange = 'textDocument/foldingRange', 959 --- A request to format a whole document. 960 textDocument_formatting = 'textDocument/formatting', 961 --- Request to request hover information at a given text document position. The request's 962 --- parameter is of type {@link TextDocumentPosition} the response is of 963 --- type {@link Hover} or a Thenable that resolves to such. 964 textDocument_hover = 'textDocument/hover', 965 --- A request to resolve the implementation locations of a symbol at a given text 966 --- document position. The request's parameter is of type {@link TextDocumentPositionParams} 967 --- the response is of type {@link Definition} or a Thenable that resolves to such. 968 textDocument_implementation = 'textDocument/implementation', 969 --- A request to provide inlay hints in a document. The request's parameter is of 970 --- type {@link InlayHintsParams}, the response is of type 971 --- {@link InlayHint InlayHint[]} or a Thenable that resolves to such. 972 --- @since 3.17.0 973 textDocument_inlayHint = 'textDocument/inlayHint', 974 --- A request to provide inline completions in a document. The request's parameter is of 975 --- type {@link InlineCompletionParams}, the response is of type 976 --- {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. 977 --- @since 3.18.0 978 --- @proposed 979 textDocument_inlineCompletion = 'textDocument/inlineCompletion', 980 --- A request to provide inline values in a document. The request's parameter is of 981 --- type {@link InlineValueParams}, the response is of type 982 --- {@link InlineValue InlineValue[]} or a Thenable that resolves to such. 983 --- @since 3.17.0 984 textDocument_inlineValue = 'textDocument/inlineValue', 985 --- A request to provide ranges that can be edited together. 986 --- @since 3.16.0 987 textDocument_linkedEditingRange = 'textDocument/linkedEditingRange', 988 --- A request to get the moniker of a symbol at a given text document position. 989 --- The request parameter is of type {@link TextDocumentPositionParams}. 990 --- The response is of type {@link Moniker Moniker[]} or `null`. 991 textDocument_moniker = 'textDocument/moniker', 992 --- A request to format a document on type. 993 textDocument_onTypeFormatting = 'textDocument/onTypeFormatting', 994 --- A request to result a `CallHierarchyItem` in a document at a given position. 995 --- Can be used as an input to an incoming or outgoing call hierarchy. 996 --- @since 3.16.0 997 textDocument_prepareCallHierarchy = 'textDocument/prepareCallHierarchy', 998 --- A request to test and perform the setup necessary for a rename. 999 --- @since 3.16 - support for default behavior 1000 textDocument_prepareRename = 'textDocument/prepareRename', 1001 --- A request to result a `TypeHierarchyItem` in a document at a given position. 1002 --- Can be used as an input to a subtypes or supertypes type hierarchy. 1003 --- @since 3.17.0 1004 textDocument_prepareTypeHierarchy = 'textDocument/prepareTypeHierarchy', 1005 --- Diagnostics notification are sent from the server to the client to signal 1006 --- results of validation runs. 1007 textDocument_publishDiagnostics = 'textDocument/publishDiagnostics', 1008 --- A request to format a range in a document. 1009 textDocument_rangeFormatting = 'textDocument/rangeFormatting', 1010 --- A request to format ranges in a document. 1011 --- @since 3.18.0 1012 --- @proposed 1013 textDocument_rangesFormatting = 'textDocument/rangesFormatting', 1014 --- A request to resolve project-wide references for the symbol denoted 1015 --- by the given text document position. The request's parameter is of 1016 --- type {@link ReferenceParams} the response is of type 1017 --- {@link Location Location[]} or a Thenable that resolves to such. 1018 textDocument_references = 'textDocument/references', 1019 --- A request to rename a symbol. 1020 textDocument_rename = 'textDocument/rename', 1021 --- A request to provide selection ranges in a document. The request's 1022 --- parameter is of type {@link SelectionRangeParams}, the 1023 --- response is of type {@link SelectionRange SelectionRange[]} or a Thenable 1024 --- that resolves to such. 1025 textDocument_selectionRange = 'textDocument/selectionRange', 1026 --- @since 3.16.0 1027 textDocument_semanticTokens_full = 'textDocument/semanticTokens/full', 1028 --- @since 3.16.0 1029 textDocument_semanticTokens_full_delta = 'textDocument/semanticTokens/full/delta', 1030 --- @since 3.16.0 1031 textDocument_semanticTokens_range = 'textDocument/semanticTokens/range', 1032 textDocument_signatureHelp = 'textDocument/signatureHelp', 1033 --- A request to resolve the type definition locations of a symbol at a given text 1034 --- document position. The request's parameter is of type {@link TextDocumentPositionParams} 1035 --- the response is of type {@link Definition} or a Thenable that resolves to such. 1036 textDocument_typeDefinition = 'textDocument/typeDefinition', 1037 --- A document will save notification is sent from the client to the server before 1038 --- the document is actually saved. 1039 textDocument_willSave = 'textDocument/willSave', 1040 --- A document will save request is sent from the client to the server before 1041 --- the document is actually saved. The request can return an array of TextEdits 1042 --- which will be applied to the text document before it is saved. Please note that 1043 --- clients might drop results if computing the text edits took too long or if a 1044 --- server constantly fails on this request. This is done to keep the save fast and 1045 --- reliable. 1046 textDocument_willSaveWaitUntil = 'textDocument/willSaveWaitUntil', 1047 --- A request to resolve the subtypes for a given `TypeHierarchyItem`. 1048 --- @since 3.17.0 1049 typeHierarchy_subtypes = 'typeHierarchy/subtypes', 1050 --- A request to resolve the supertypes for a given `TypeHierarchyItem`. 1051 --- @since 3.17.0 1052 typeHierarchy_supertypes = 'typeHierarchy/supertypes', 1053 --- The log message notification is sent from the server to the client to ask 1054 --- the client to log a particular message. 1055 window_logMessage = 'window/logMessage', 1056 --- A request to show a document. This request might open an 1057 --- external program depending on the value of the URI to open. 1058 --- For example a request to open `https://code.visualstudio.com/` 1059 --- will very likely open the URI in a WEB browser. 1060 --- @since 3.16.0 1061 window_showDocument = 'window/showDocument', 1062 --- The show message notification is sent from a server to a client to ask 1063 --- the client to display a particular message in the user interface. 1064 window_showMessage = 'window/showMessage', 1065 --- The show message request is sent from the server to the client to show a message 1066 --- and a set of options actions to the user. 1067 window_showMessageRequest = 'window/showMessageRequest', 1068 --- The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress 1069 --- initiated on the server side. 1070 window_workDoneProgress_cancel = 'window/workDoneProgress/cancel', 1071 --- The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress 1072 --- reporting from the server. 1073 window_workDoneProgress_create = 'window/workDoneProgress/create', 1074 --- A request to resolve the range inside the workspace 1075 --- symbol's location. 1076 --- @since 3.17.0 1077 workspaceSymbol_resolve = 'workspaceSymbol/resolve', 1078 --- A request sent from the server to the client to modified certain resources. 1079 workspace_applyEdit = 'workspace/applyEdit', 1080 --- A request to refresh all code actions 1081 --- @since 3.16.0 1082 workspace_codeLens_refresh = 'workspace/codeLens/refresh', 1083 --- The 'workspace/configuration' request is sent from the server to the client to fetch a certain 1084 --- configuration setting. 1085 --- This pull model replaces the old push model were the client signaled configuration change via an 1086 --- event. If the server still needs to react to configuration changes (since the server caches the 1087 --- result of `workspace/configuration` requests) the server should register for an empty configuration 1088 --- change event and empty the cache if such an event is received. 1089 workspace_configuration = 'workspace/configuration', 1090 --- The workspace diagnostic request definition. 1091 --- @since 3.17.0 1092 workspace_diagnostic = 'workspace/diagnostic', 1093 --- The diagnostic refresh request definition. 1094 --- @since 3.17.0 1095 workspace_diagnostic_refresh = 'workspace/diagnostic/refresh', 1096 --- The configuration change notification is sent from the client to the server 1097 --- when the client's configuration has changed. The notification contains 1098 --- the changed configuration as defined by the language client. 1099 workspace_didChangeConfiguration = 'workspace/didChangeConfiguration', 1100 --- The watched files notification is sent from the client to the server when 1101 --- the client detects changes to file watched by the language client. 1102 workspace_didChangeWatchedFiles = 'workspace/didChangeWatchedFiles', 1103 --- The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace 1104 --- folder configuration changes. 1105 workspace_didChangeWorkspaceFolders = 'workspace/didChangeWorkspaceFolders', 1106 --- The did create files notification is sent from the client to the server when 1107 --- files were created from within the client. 1108 --- @since 3.16.0 1109 workspace_didCreateFiles = 'workspace/didCreateFiles', 1110 --- The will delete files request is sent from the client to the server before files are actually 1111 --- deleted as long as the deletion is triggered from within the client. 1112 --- @since 3.16.0 1113 workspace_didDeleteFiles = 'workspace/didDeleteFiles', 1114 --- The did rename files notification is sent from the client to the server when 1115 --- files were renamed from within the client. 1116 --- @since 3.16.0 1117 workspace_didRenameFiles = 'workspace/didRenameFiles', 1118 --- A request send from the client to the server to execute a command. The request might return 1119 --- a workspace edit which the client will apply to the workspace. 1120 workspace_executeCommand = 'workspace/executeCommand', 1121 --- @since 3.18.0 1122 --- @proposed 1123 workspace_foldingRange_refresh = 'workspace/foldingRange/refresh', 1124 --- @since 3.17.0 1125 workspace_inlayHint_refresh = 'workspace/inlayHint/refresh', 1126 --- @since 3.17.0 1127 workspace_inlineValue_refresh = 'workspace/inlineValue/refresh', 1128 --- @since 3.16.0 1129 workspace_semanticTokens_refresh = 'workspace/semanticTokens/refresh', 1130 --- A request to list project-wide symbols matching the query string given 1131 --- by the {@link WorkspaceSymbolParams}. The response is 1132 --- of type {@link SymbolInformation SymbolInformation[]} or a Thenable that 1133 --- resolves to such. 1134 --- @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients 1135 --- need to advertise support for WorkspaceSymbols via the client capability 1136 --- `workspace.symbol.resolveSupport`. 1137 workspace_symbol = 'workspace/symbol', 1138 --- The `workspace/textDocumentContent` request is sent from the client to the 1139 --- server to request the content of a text document. 1140 --- @since 3.18.0 1141 --- @proposed 1142 workspace_textDocumentContent = 'workspace/textDocumentContent', 1143 --- The `workspace/textDocumentContent` request is sent from the server to the client to refresh 1144 --- the content of a specific text document. 1145 --- @since 3.18.0 1146 --- @proposed 1147 workspace_textDocumentContent_refresh = 'workspace/textDocumentContent/refresh', 1148 --- The will create files request is sent from the client to the server before files are actually 1149 --- created as long as the creation is triggered from within the client. 1150 --- The request can return a `WorkspaceEdit` which will be applied to workspace before the 1151 --- files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file 1152 --- to be created. 1153 --- @since 3.16.0 1154 workspace_willCreateFiles = 'workspace/willCreateFiles', 1155 --- The did delete files notification is sent from the client to the server when 1156 --- files were deleted from within the client. 1157 --- @since 3.16.0 1158 workspace_willDeleteFiles = 'workspace/willDeleteFiles', 1159 --- The will rename files request is sent from the client to the server before files are actually 1160 --- renamed as long as the rename is triggered from within the client. 1161 --- @since 3.16.0 1162 workspace_willRenameFiles = 'workspace/willRenameFiles', 1163 --- The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. 1164 workspace_workspaceFolders = 'workspace/workspaceFolders', 1165 } 1166 1167 -- Generated by gen_lsp.lua, keep at end of file. 1168 --- LSP registration methods 1169 ---@alias vim.lsp.protocol.Method.Registration 1170 --- | 'notebookDocument/sync' 1171 --- | 'textDocument/semanticTokens' 1172 1173 -- stylua: ignore start 1174 -- Generated by gen_lsp.lua, keep at end of file. 1175 --- Maps method names to the required client capability 1176 ---TODO: also has workspace/* items because spec lacks a top-level "workspaceProvider" 1177 protocol._provider_to_client_registration = { 1178 ['callHierarchyProvider'] = { 'textDocument', 'callHierarchy' }, 1179 ['codeActionProvider'] = { 'textDocument', 'codeAction' }, 1180 ['codeLensProvider'] = { 'textDocument', 'codeLens' }, 1181 ['colorProvider'] = { 'textDocument', 'colorProvider' }, 1182 ['completionProvider'] = { 'textDocument', 'completion' }, 1183 ['declarationProvider'] = { 'textDocument', 'declaration' }, 1184 ['definitionProvider'] = { 'textDocument', 'definition' }, 1185 ['diagnosticProvider'] = { 'textDocument', 'diagnostic' }, 1186 ['documentFormattingProvider'] = { 'textDocument', 'formatting' }, 1187 ['documentHighlightProvider'] = { 'textDocument', 'documentHighlight' }, 1188 ['documentLinkProvider'] = { 'textDocument', 'documentLink' }, 1189 ['documentOnTypeFormattingProvider'] = { 'textDocument', 'onTypeFormatting' }, 1190 ['documentRangeFormattingProvider'] = { 'textDocument', 'rangeFormatting' }, 1191 ['documentSymbolProvider'] = { 'textDocument', 'documentSymbol' }, 1192 ['executeCommandProvider'] = { 'workspace', 'executeCommand' }, 1193 ['foldingRangeProvider'] = { 'textDocument', 'foldingRange' }, 1194 ['hoverProvider'] = { 'textDocument', 'hover' }, 1195 ['implementationProvider'] = { 'textDocument', 'implementation' }, 1196 ['inlayHintProvider'] = { 'textDocument', 'inlayHint' }, 1197 ['inlineCompletionProvider'] = { 'textDocument', 'inlineCompletion' }, 1198 ['inlineValueProvider'] = { 'textDocument', 'inlineValue' }, 1199 ['linkedEditingRangeProvider'] = { 'textDocument', 'linkedEditingRange' }, 1200 ['monikerProvider'] = { 'textDocument', 'moniker' }, 1201 ['referencesProvider'] = { 'textDocument', 'references' }, 1202 ['renameProvider'] = { 'textDocument', 'rename' }, 1203 ['selectionRangeProvider'] = { 'textDocument', 'selectionRange' }, 1204 ['semanticTokensProvider'] = { 'textDocument', 'semanticTokens' }, 1205 ['signatureHelpProvider'] = { 'textDocument', 'signatureHelp' }, 1206 ['textDocumentSync'] = { 'textDocument', 'synchronization' }, 1207 ['typeDefinitionProvider'] = { 'textDocument', 'typeDefinition' }, 1208 ['typeHierarchyProvider'] = { 'textDocument', 'typeHierarchy' }, 1209 ['workspace/didChangeConfiguration'] = { 'workspace', 'didChangeConfiguration' }, 1210 ['workspace/didChangeWatchedFiles'] = { 'workspace', 'didChangeWatchedFiles' }, 1211 ['workspace/didCreateFiles'] = { 'workspace', 'fileOperations', 'didCreate' }, 1212 ['workspace/didDeleteFiles'] = { 'workspace', 'fileOperations', 'didDelete' }, 1213 ['workspace/didRenameFiles'] = { 'workspace', 'fileOperations', 'didRename' }, 1214 ['workspace/textDocumentContent'] = { 'workspace', 'textDocumentContent' }, 1215 ['workspace/willCreateFiles'] = { 'workspace', 'fileOperations', 'willCreate' }, 1216 ['workspace/willDeleteFiles'] = { 'workspace', 'fileOperations', 'willDelete' }, 1217 ['workspace/willRenameFiles'] = { 'workspace', 'fileOperations', 'willRename' }, 1218 ['workspaceSymbolProvider'] = { 'workspace', 'symbol' }, 1219 } 1220 -- stylua: ignore end 1221 1222 -- stylua: ignore start 1223 -- Generated by gen_lsp.lua, keep at end of file. 1224 --- Maps method names to the required server capability 1225 -- A server capability equal to the method means there is no related server capability 1226 protocol._request_name_to_server_capability = { 1227 ['callHierarchy/incomingCalls'] = { 'callHierarchy/incomingCalls' }, 1228 ['callHierarchy/outgoingCalls'] = { 'callHierarchy/outgoingCalls' }, 1229 ['client/registerCapability'] = { 'client/registerCapability' }, 1230 ['client/unregisterCapability'] = { 'client/unregisterCapability' }, 1231 ['codeAction/resolve'] = { 'codeActionProvider', 'resolveProvider' }, 1232 ['codeLens/resolve'] = { 'codeLensProvider', 'resolveProvider' }, 1233 ['completionItem/resolve'] = { 'completionProvider', 'resolveProvider' }, 1234 ['documentLink/resolve'] = { 'documentLinkProvider', 'resolveProvider' }, 1235 ['$/cancelRequest'] = { '$/cancelRequest' }, 1236 ['$/logTrace'] = { '$/logTrace' }, 1237 ['$/progress'] = { '$/progress' }, 1238 ['$/setTrace'] = { '$/setTrace' }, 1239 ['exit'] = { 'exit' }, 1240 ['initialize'] = { 'initialize' }, 1241 ['initialized'] = { 'initialized' }, 1242 ['inlayHint/resolve'] = { 'inlayHintProvider', 'resolveProvider' }, 1243 ['notebookDocument/didChange'] = { 'notebookDocument/didChange' }, 1244 ['notebookDocument/didClose'] = { 'notebookDocument/didClose' }, 1245 ['notebookDocument/didOpen'] = { 'notebookDocument/didOpen' }, 1246 ['notebookDocument/didSave'] = { 'notebookDocument/didSave' }, 1247 ['shutdown'] = { 'shutdown' }, 1248 ['telemetry/event'] = { 'telemetry/event' }, 1249 ['textDocument/codeAction'] = { 'codeActionProvider' }, 1250 ['textDocument/codeLens'] = { 'codeLensProvider' }, 1251 ['textDocument/colorPresentation'] = { 'colorProvider' }, 1252 ['textDocument/completion'] = { 'completionProvider' }, 1253 ['textDocument/declaration'] = { 'declarationProvider' }, 1254 ['textDocument/definition'] = { 'definitionProvider' }, 1255 ['textDocument/diagnostic'] = { 'diagnosticProvider' }, 1256 ['textDocument/didChange'] = { 'textDocumentSync' }, 1257 ['textDocument/didClose'] = { 'textDocumentSync', 'openClose' }, 1258 ['textDocument/didOpen'] = { 'textDocumentSync', 'openClose' }, 1259 ['textDocument/didSave'] = { 'textDocumentSync', 'save' }, 1260 ['textDocument/documentColor'] = { 'colorProvider' }, 1261 ['textDocument/documentHighlight'] = { 'documentHighlightProvider' }, 1262 ['textDocument/documentLink'] = { 'documentLinkProvider' }, 1263 ['textDocument/documentSymbol'] = { 'documentSymbolProvider' }, 1264 ['textDocument/foldingRange'] = { 'foldingRangeProvider' }, 1265 ['textDocument/formatting'] = { 'documentFormattingProvider' }, 1266 ['textDocument/hover'] = { 'hoverProvider' }, 1267 ['textDocument/implementation'] = { 'implementationProvider' }, 1268 ['textDocument/inlayHint'] = { 'inlayHintProvider' }, 1269 ['textDocument/inlineCompletion'] = { 'inlineCompletionProvider' }, 1270 ['textDocument/inlineValue'] = { 'inlineValueProvider' }, 1271 ['textDocument/linkedEditingRange'] = { 'linkedEditingRangeProvider' }, 1272 ['textDocument/moniker'] = { 'monikerProvider' }, 1273 ['textDocument/onTypeFormatting'] = { 'documentOnTypeFormattingProvider' }, 1274 ['textDocument/prepareCallHierarchy'] = { 'callHierarchyProvider' }, 1275 ['textDocument/prepareRename'] = { 'renameProvider', 'prepareProvider' }, 1276 ['textDocument/prepareTypeHierarchy'] = { 'typeHierarchyProvider' }, 1277 ['textDocument/publishDiagnostics'] = { 'textDocument/publishDiagnostics' }, 1278 ['textDocument/rangeFormatting'] = { 'documentRangeFormattingProvider' }, 1279 ['textDocument/rangesFormatting'] = { 'documentRangeFormattingProvider', 'rangesSupport' }, 1280 ['textDocument/references'] = { 'referencesProvider' }, 1281 ['textDocument/rename'] = { 'renameProvider' }, 1282 ['textDocument/selectionRange'] = { 'selectionRangeProvider' }, 1283 ['textDocument/semanticTokens/full'] = { 'semanticTokensProvider' }, 1284 ['textDocument/semanticTokens/full/delta'] = { 'semanticTokensProvider', 'full', 'delta' }, 1285 ['textDocument/semanticTokens/range'] = { 'semanticTokensProvider', 'range' }, 1286 ['textDocument/signatureHelp'] = { 'signatureHelpProvider' }, 1287 ['textDocument/typeDefinition'] = { 'typeDefinitionProvider' }, 1288 ['textDocument/willSave'] = { 'textDocumentSync', 'willSave' }, 1289 ['textDocument/willSaveWaitUntil'] = { 'textDocumentSync', 'willSaveWaitUntil' }, 1290 ['typeHierarchy/subtypes'] = { 'typeHierarchy/subtypes' }, 1291 ['typeHierarchy/supertypes'] = { 'typeHierarchy/supertypes' }, 1292 ['window/logMessage'] = { 'window/logMessage' }, 1293 ['window/showDocument'] = { 'window/showDocument' }, 1294 ['window/showMessage'] = { 'window/showMessage' }, 1295 ['window/showMessageRequest'] = { 'window/showMessageRequest' }, 1296 ['window/workDoneProgress/cancel'] = { 'window/workDoneProgress/cancel' }, 1297 ['window/workDoneProgress/create'] = { 'window/workDoneProgress/create' }, 1298 ['workspaceSymbol/resolve'] = { 'workspaceSymbolProvider', 'resolveProvider' }, 1299 ['workspace/applyEdit'] = { 'workspace/applyEdit' }, 1300 ['workspace/codeLens/refresh'] = { 'workspace/codeLens/refresh' }, 1301 ['workspace/configuration'] = { 'workspace/configuration' }, 1302 ['workspace/diagnostic'] = { 'diagnosticProvider', 'workspaceDiagnostics' }, 1303 ['workspace/diagnostic/refresh'] = { 'workspace/diagnostic/refresh' }, 1304 ['workspace/didChangeConfiguration'] = { 'workspace/didChangeConfiguration' }, 1305 ['workspace/didChangeWatchedFiles'] = { 'workspace/didChangeWatchedFiles' }, 1306 ['workspace/didChangeWorkspaceFolders'] = { 'workspace', 'workspaceFolders', 'changeNotifications' }, 1307 ['workspace/didCreateFiles'] = { 'workspace', 'fileOperations', 'didCreate' }, 1308 ['workspace/didDeleteFiles'] = { 'workspace', 'fileOperations', 'didDelete' }, 1309 ['workspace/didRenameFiles'] = { 'workspace', 'fileOperations', 'didRename' }, 1310 ['workspace/executeCommand'] = { 'executeCommandProvider' }, 1311 ['workspace/foldingRange/refresh'] = { 'workspace/foldingRange/refresh' }, 1312 ['workspace/inlayHint/refresh'] = { 'workspace/inlayHint/refresh' }, 1313 ['workspace/inlineValue/refresh'] = { 'workspace/inlineValue/refresh' }, 1314 ['workspace/semanticTokens/refresh'] = { 'workspace/semanticTokens/refresh' }, 1315 ['workspace/symbol'] = { 'workspaceSymbolProvider' }, 1316 ['workspace/textDocumentContent'] = { 'workspace', 'textDocumentContent' }, 1317 ['workspace/textDocumentContent/refresh'] = { 'workspace/textDocumentContent/refresh' }, 1318 ['workspace/willCreateFiles'] = { 'workspace', 'fileOperations', 'willCreate' }, 1319 ['workspace/willDeleteFiles'] = { 'workspace', 'fileOperations', 'willDelete' }, 1320 ['workspace/willRenameFiles'] = { 'workspace', 'fileOperations', 'willRename' }, 1321 ['workspace/workspaceFolders'] = { 'workspace', 'workspaceFolders' }, 1322 ['textDocument/semanticTokens'] = { 'semanticTokensProvider' }, 1323 } 1324 -- stylua: ignore end 1325 1326 -- stylua: ignore start 1327 -- Generated by gen_lsp.lua, keep at end of file. 1328 protocol._method_supports_dynamic_registration = { 1329 ['notebookDocument/didChange'] = true, 1330 ['notebookDocument/didClose'] = true, 1331 ['notebookDocument/didOpen'] = true, 1332 ['notebookDocument/didSave'] = true, 1333 ['textDocument/codeAction'] = true, 1334 ['textDocument/codeLens'] = true, 1335 ['textDocument/colorPresentation'] = true, 1336 ['textDocument/completion'] = true, 1337 ['textDocument/declaration'] = true, 1338 ['textDocument/definition'] = true, 1339 ['textDocument/diagnostic'] = true, 1340 ['textDocument/didChange'] = true, 1341 ['textDocument/didClose'] = true, 1342 ['textDocument/didOpen'] = true, 1343 ['textDocument/didSave'] = true, 1344 ['textDocument/documentColor'] = true, 1345 ['textDocument/documentHighlight'] = true, 1346 ['textDocument/documentLink'] = true, 1347 ['textDocument/documentSymbol'] = true, 1348 ['textDocument/foldingRange'] = true, 1349 ['textDocument/formatting'] = true, 1350 ['textDocument/hover'] = true, 1351 ['textDocument/implementation'] = true, 1352 ['textDocument/inlayHint'] = true, 1353 ['textDocument/inlineCompletion'] = true, 1354 ['textDocument/inlineValue'] = true, 1355 ['textDocument/linkedEditingRange'] = true, 1356 ['textDocument/moniker'] = true, 1357 ['textDocument/onTypeFormatting'] = true, 1358 ['textDocument/prepareCallHierarchy'] = true, 1359 ['textDocument/prepareTypeHierarchy'] = true, 1360 ['textDocument/rangeFormatting'] = true, 1361 ['textDocument/rangesFormatting'] = true, 1362 ['textDocument/references'] = true, 1363 ['textDocument/rename'] = true, 1364 ['textDocument/selectionRange'] = true, 1365 ['textDocument/semanticTokens/full'] = true, 1366 ['textDocument/semanticTokens/full/delta'] = true, 1367 ['textDocument/semanticTokens/range'] = true, 1368 ['textDocument/signatureHelp'] = true, 1369 ['textDocument/typeDefinition'] = true, 1370 ['textDocument/willSave'] = true, 1371 ['textDocument/willSaveWaitUntil'] = true, 1372 ['workspace/didChangeConfiguration'] = true, 1373 ['workspace/didChangeWatchedFiles'] = true, 1374 ['workspace/didChangeWorkspaceFolders'] = true, 1375 ['workspace/didCreateFiles'] = true, 1376 ['workspace/didDeleteFiles'] = true, 1377 ['workspace/didRenameFiles'] = true, 1378 ['workspace/executeCommand'] = true, 1379 ['workspace/symbol'] = true, 1380 ['workspace/textDocumentContent'] = true, 1381 ['workspace/willCreateFiles'] = true, 1382 ['workspace/willDeleteFiles'] = true, 1383 ['workspace/willRenameFiles'] = true, 1384 } 1385 -- stylua: ignore end 1386 1387 -- stylua: ignore start 1388 -- Generated by gen_lsp.lua, keep at end of file. 1389 protocol._method_supports_static_registration = { 1390 ['textDocument/codeAction'] = true, 1391 ['textDocument/codeLens'] = true, 1392 ['textDocument/colorPresentation'] = true, 1393 ['textDocument/completion'] = true, 1394 ['textDocument/declaration'] = true, 1395 ['textDocument/definition'] = true, 1396 ['textDocument/diagnostic'] = true, 1397 ['textDocument/didChange'] = true, 1398 ['textDocument/documentColor'] = true, 1399 ['textDocument/documentHighlight'] = true, 1400 ['textDocument/documentLink'] = true, 1401 ['textDocument/documentSymbol'] = true, 1402 ['textDocument/foldingRange'] = true, 1403 ['textDocument/formatting'] = true, 1404 ['textDocument/hover'] = true, 1405 ['textDocument/implementation'] = true, 1406 ['textDocument/inlayHint'] = true, 1407 ['textDocument/inlineCompletion'] = true, 1408 ['textDocument/inlineValue'] = true, 1409 ['textDocument/linkedEditingRange'] = true, 1410 ['textDocument/moniker'] = true, 1411 ['textDocument/onTypeFormatting'] = true, 1412 ['textDocument/prepareCallHierarchy'] = true, 1413 ['textDocument/prepareTypeHierarchy'] = true, 1414 ['textDocument/rangeFormatting'] = true, 1415 ['textDocument/references'] = true, 1416 ['textDocument/rename'] = true, 1417 ['textDocument/selectionRange'] = true, 1418 ['textDocument/semanticTokens/full'] = true, 1419 ['textDocument/signatureHelp'] = true, 1420 ['textDocument/typeDefinition'] = true, 1421 ['workspace/executeCommand'] = true, 1422 ['workspace/symbol'] = true, 1423 } 1424 -- stylua: ignore end 1425 1426 -- stylua: ignore start 1427 -- Generated by gen_lsp.lua, keep at end of file. 1428 -- These methods have no registration options but can still be registered dynamically. 1429 protocol._methods_with_no_registration_options = { 1430 ['workspace/didChangeWorkspaceFolders'] = true , 1431 } 1432 -- stylua: ignore end 1433 1434 return protocol