diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-20 07:34:50 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2024-09-23 14:42:57 +0200 |
commit | 737f58e23230ea14f1648ac1fc7f442ea0f8563c (patch) | |
tree | d16bee4c0ad2bb5ff2ec058cd09133a285674fef /runtime/lua/vim/lsp/client.lua | |
parent | 5acdc4499e2036c90172b2b085f207ee4d5cfee4 (diff) | |
download | rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.gz rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.tar.bz2 rneovim-737f58e23230ea14f1648ac1fc7f442ea0f8563c.zip |
refactor(api)!: rename Dictionary => Dict
In the api_info() output:
:new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
...
{'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}
The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary => Dict in api_info() is not (in practice)
a breaking change.
Diffstat (limited to 'runtime/lua/vim/lsp/client.lua')
-rw-r--r-- | runtime/lua/vim/lsp/client.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/client.lua b/runtime/lua/vim/lsp/client.lua index 8cdfdd4b90..e3c82f4169 100644 --- a/runtime/lua/vim/lsp/client.lua +++ b/runtime/lua/vim/lsp/client.lua @@ -233,11 +233,11 @@ local validate = vim.validate --- --- Sends a request to the server and synchronously waits for the response. --- This is a wrapper around {client.request} ---- Returns: { err=err, result=result }, a dictionary, where `err` and `result` +--- Returns: { err=err, result=result }, a dict, where `err` and `result` --- come from the |lsp-handler|. On timeout, cancel or error, returns `(nil, --- err)` where `err` is a string describing the failure reason. If the request --- was unsuccessful returns `nil`. ---- @field request_sync fun(method: string, params: table?, timeout_ms: integer?, bufnr: integer): {err: lsp.ResponseError|nil, result:any}|nil, string|nil err # a dictionary, where +--- @field request_sync fun(method: string, params: table?, timeout_ms: integer?, bufnr: integer): {err: lsp.ResponseError|nil, result:any}|nil, string|nil err # a dict --- --- Sends a notification to an LSP server. --- Returns: a boolean to indicate if the notification was successful. If @@ -738,7 +738,7 @@ end --- @param timeout_ms (integer|nil) Maximum time in milliseconds to wait for --- a result. Defaults to 1000 --- @param bufnr (integer) Buffer handle (0 for current). ---- @return {err: lsp.ResponseError|nil, result:any}|nil, string|nil err # a dictionary, where +--- @return {err: lsp.ResponseError|nil, result:any}|nil, string|nil err # a dict, where --- `err` and `result` come from the |lsp-handler|. --- On timeout, cancel or error, returns `(nil, err)` where `err` is a --- string describing the failure reason. If the request was unsuccessful |