mirror of
https://github.com/neovim/neovim.git
synced 2025-10-20 08:41:55 +00:00
fix(lsp): include missing LSP methods and update type annotations
This commit is contained in:
@@ -728,6 +728,8 @@ end
|
|||||||
|
|
||||||
--- LSP Notification (direction: clientToServer)
|
--- LSP Notification (direction: clientToServer)
|
||||||
--- @alias vim.lsp.protocol.Method.ClientToServer.Notification
|
--- @alias vim.lsp.protocol.Method.ClientToServer.Notification
|
||||||
|
--- | '$/cancelRequest',
|
||||||
|
--- | '$/progress',
|
||||||
--- | '$/setTrace',
|
--- | '$/setTrace',
|
||||||
--- | 'exit',
|
--- | 'exit',
|
||||||
--- | 'initialized',
|
--- | 'initialized',
|
||||||
@@ -773,7 +775,9 @@ end
|
|||||||
|
|
||||||
--- LSP Notification (direction: serverToClient)
|
--- LSP Notification (direction: serverToClient)
|
||||||
--- @alias vim.lsp.protocol.Method.ServerToClient.Notification
|
--- @alias vim.lsp.protocol.Method.ServerToClient.Notification
|
||||||
|
--- | '$/cancelRequest',
|
||||||
--- | '$/logTrace',
|
--- | '$/logTrace',
|
||||||
|
--- | '$/progress',
|
||||||
--- | 'telemetry/event',
|
--- | 'telemetry/event',
|
||||||
--- | 'textDocument/publishDiagnostics',
|
--- | 'textDocument/publishDiagnostics',
|
||||||
--- | 'window/logMessage',
|
--- | 'window/logMessage',
|
||||||
|
@@ -157,7 +157,7 @@ local function write_to_vim_protocol(protocol)
|
|||||||
output[#output + 1] = ('--- LSP %s (direction: %s)'):format(b.title, dir)
|
output[#output + 1] = ('--- LSP %s (direction: %s)'):format(b.title, dir)
|
||||||
output[#output + 1] = ('--- @alias %s.%s'):format(alias, b.title)
|
output[#output + 1] = ('--- @alias %s.%s'):format(alias, b.title)
|
||||||
for _, item in ipairs(b.methods) do
|
for _, item in ipairs(b.methods) do
|
||||||
if item.messageDirection == dir then
|
if item.messageDirection == dir or item.messageDirection == 'both' then
|
||||||
output[#output + 1] = ("--- | '%s',"):format(item.method)
|
output[#output + 1] = ("--- | '%s',"):format(item.method)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -287,6 +287,9 @@ local anonym_classes = {}
|
|||||||
--- @return string
|
--- @return string
|
||||||
local function parse_type(type, prefix)
|
local function parse_type(type, prefix)
|
||||||
if type.kind == 'reference' or type.kind == 'base' then
|
if type.kind == 'reference' or type.kind == 'base' then
|
||||||
|
if type.kind == 'base' and type.name == 'string' and prefix == 'method' then
|
||||||
|
return 'vim.lsp.protocol.Method'
|
||||||
|
end
|
||||||
if simple_types[type.name] then
|
if simple_types[type.name] then
|
||||||
return type.name
|
return type.name
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user