mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
feat(lsp): deprecate non-method client functions
Deprecated: - `client.request()` -> `client:request()` - `client.request_sync()` -> `client:request_sync()` - `client.notify()` -> `client:notify()` - `client.cancel_request()` -> `client:cancel_request()` - `client.stop()` -> `client:stop()` - `client.is_stopped()` `client:is_stopped()` - `client.supports_method()` -> `client:supports_method()` - `client.on_attach()` -> `client:on_attach()` Fixed docgen to link class fields to the full function doc.
This commit is contained in:

committed by
Lewis Russell

parent
f55c842ec7
commit
454ae672aa
@@ -122,12 +122,12 @@ end
|
||||
--- local hint = vim.lsp.inlay_hint.get({ bufnr = 0 })[1] -- 0 for current buffer
|
||||
---
|
||||
--- local client = vim.lsp.get_client_by_id(hint.client_id)
|
||||
--- local resp = client.request_sync('inlayHint/resolve', hint.inlay_hint, 100, 0)
|
||||
--- local resp = client:request_sync('inlayHint/resolve', hint.inlay_hint, 100, 0)
|
||||
--- local resolved_hint = assert(resp and resp.result, resp.err)
|
||||
--- vim.lsp.util.apply_text_edits(resolved_hint.textEdits, 0, client.encoding)
|
||||
---
|
||||
--- location = resolved_hint.label[1].location
|
||||
--- client.request('textDocument/hover', {
|
||||
--- client:request('textDocument/hover', {
|
||||
--- textDocument = { uri = location.uri },
|
||||
--- position = location.range.start,
|
||||
--- })
|
||||
|
Reference in New Issue
Block a user