|
| 1 | +---@alias TextDocumentFunction fun(client: vim.lsp.Client): lsp.TextDocumentPositionParams |
| 2 | + |
1 | 3 | local channel = require("plenary.async.control").channel |
2 | 4 | local actions = require "telescope.actions" |
3 | 5 | local sorters = require "telescope.sorters" |
@@ -68,12 +70,12 @@ local function pick_call_hierarchy_item(call_hierarchy_items) |
68 | 70 | return call_hierarchy_items[choice] |
69 | 71 | end |
70 | 72 |
|
71 | | ----@param win number? Window handler |
72 | | ----@param extra table? Extra fields in params |
73 | | ----@return table|(fun(client: vim.lsp.Client): table) parmas to send to the server |
| 73 | +---@param win number|nil: Window handler |
| 74 | +---@param extra lsp.TextDocumentPositionParams|nil: Extra fields in params |
| 75 | +---@return lsp.TextDocumentPositionParams|TextDocumentFunction: Params to send to the server |
74 | 76 | local function client_position_params(win, extra) |
75 | 77 | win = win or vim.api.nvim_get_current_win() |
76 | | - if vim.fn.has "nvim-0.11" == 0 then |
| 78 | + if 1 ~= vim.fn.has "nvim-0.11" then |
77 | 79 | local params = vim.lsp.util.make_position_params(win) |
78 | 80 | if extra then |
79 | 81 | params = vim.tbl_extend("force", params, extra) |
@@ -204,7 +206,7 @@ local function list_or_jump(action, title, funname, params, opts) |
204 | 206 | local errors = {} |
205 | 207 |
|
206 | 208 | for client_id, result_or_error in pairs(results_per_client) do |
207 | | - local error, result = result_or_error.error, result_or_error.result |
| 209 | + local error, result = result_or_error.err, result_or_error.result |
208 | 210 | if error then |
209 | 211 | errors[client_id] = error |
210 | 212 | else |
|
0 commit comments