robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

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