refactor(lsp): mark server_ready function as deprecated (#23520)

This commit is contained in:
Raphael 2023-05-13 17:27:05 +08:00 committed by GitHub
parent 6a273af105
commit 512a90520e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -1299,13 +1299,6 @@ rename({new_name}, {options}) *vim.lsp.buf.rename()*
• name (string|nil): Restrict clients used for rename to
ones where client.name matches this field.
server_ready() *vim.lsp.buf.server_ready()*
Checks whether the language servers attached to the current buffer are
ready.
Return: ~
`true` if server responds.
signature_help() *vim.lsp.buf.signature_help()*
Displays signature information about the symbol under the cursor in a
floating window.

View File

@ -31,7 +31,9 @@ end
--- ready.
---
---@returns `true` if server responds.
---@deprecated
function M.server_ready()
vim.deprecate('vim.lsp.buf.server_ready', nil, '0.10.0')
return not not vim.lsp.buf_notify(0, 'window/progress', {})
end