feat: Merge JSX symbols into lsp tree
This commit is contained in:
@@ -28,4 +28,22 @@ function M.array_copy(t)
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
--- Deep copy a table, deeply excluding certain keys
|
||||
function M.deepcopy_excluding(t, keys)
|
||||
local res = {}
|
||||
|
||||
for key, value in pairs(t) do
|
||||
if not vim.tbl_contains(keys, key) then
|
||||
if type(value) == "table" then
|
||||
res[key] = M.deepcopy_excluding(value, keys)
|
||||
else
|
||||
res[key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user