mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 10:01:49 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user