protocol.lua 45 KB

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