mirror of
https://github.com/neovim/neovim
synced 2025-07-18 10:11:50 +00:00
fix(lsp): use plain loop for non-list-like table of protocol values
Fixup for #27628 Closes #27669
This commit is contained in:
@ -1,9 +1,17 @@
|
|||||||
--- @diagnostic disable: duplicate-doc-alias
|
--- @diagnostic disable: duplicate-doc-alias
|
||||||
|
|
||||||
|
-- TODO(clason) can be simplified after reverse lookup is removed
|
||||||
|
---@param t table<any, any>
|
||||||
|
---@return number[]
|
||||||
local function get_value_set(t)
|
local function get_value_set(t)
|
||||||
return vim.iter.filter(function(i)
|
local result = {}
|
||||||
return type(i) == 'number'
|
for _, v in pairs(t) do
|
||||||
end, ipairs(t))
|
if type(v) == 'number' then
|
||||||
|
table.insert(result, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(result)
|
||||||
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Protocol for the Microsoft Language Server Protocol (mslsp)
|
-- Protocol for the Microsoft Language Server Protocol (mslsp)
|
||||||
|
Reference in New Issue
Block a user