mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
docs: misc (#28609)
Closes https://github.com/neovim/neovim/issues/28484. Closes https://github.com/neovim/neovim/issues/28719. Co-authored-by: Chris <crwebb85@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com> Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com> Co-authored-by: Yi Ming <ofseed@foxmail.com> Co-authored-by: Zane Dufour <zane@znd4.me> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
@@ -503,7 +503,7 @@ function M.typehierarchy(kind)
|
||||
|
||||
--- Merge results from multiple clients into a single table. Client-ID is preserved.
|
||||
---
|
||||
--- @param results table<integer, {error: lsp.ResponseError, result: lsp.TypeHierarchyItem[]?}>
|
||||
--- @param results table<integer, {error: lsp.ResponseError?, result: lsp.TypeHierarchyItem[]?}>
|
||||
--- @return [integer, lsp.TypeHierarchyItem][]
|
||||
local function merge_results(results)
|
||||
local merged_results = {}
|
||||
@@ -521,7 +521,7 @@ function M.typehierarchy(kind)
|
||||
|
||||
local bufnr = api.nvim_get_current_buf()
|
||||
local params = util.make_position_params()
|
||||
--- @param results table<integer, {error: lsp.ResponseError, result: lsp.TypeHierarchyItem[]?}>
|
||||
--- @param results table<integer, {error: lsp.ResponseError?, result: lsp.TypeHierarchyItem[]?}>
|
||||
vim.lsp.buf_request_all(bufnr, ms.textDocument_prepareTypeHierarchy, params, function(results)
|
||||
local merged_results = merge_results(results)
|
||||
if #merged_results == 0 then
|
||||
|
Reference in New Issue
Block a user