mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user