lua/shared: move table util funcs to vim.shared

Use `tbl_` prefix for all table-util functions. Specify in the function
docstring if it expects a list-like or map-like table.
This commit is contained in:
Justin M. Keyes
2019-05-18 16:00:06 +02:00
parent fd04877eb0
commit 9d7aaf7149
4 changed files with 44 additions and 44 deletions

View File

@@ -15,7 +15,7 @@ local neq = helpers.neq
local mkdir = helpers.mkdir
local rmdir = helpers.rmdir
local alter_slashes = helpers.alter_slashes
local table_contains = helpers.table_contains
local tbl_contains = helpers.tbl_contains
describe('startup defaults', function()
describe(':filetype', function()
@@ -261,7 +261,7 @@ describe('XDG-based defaults', function()
for _,v in ipairs(rtp) do
local m = string.match(v, [=[[/\]nvim[^/\]*[/\]site.*$]=])
if m and not table_contains(rv, m) then
if m and not tbl_contains(rv, m) then
table.insert(rv, m)
end
end