mirror of https://github.com/folke/neoconf.nvim
fix: deprecation warnings on 0.11
This commit is contained in:
parent
a0aa3cc5e1
commit
c6e2d969b8
|
|
@ -96,7 +96,7 @@ function M.get_schema(schema)
|
|||
|
||||
local properties = {}
|
||||
|
||||
if vim.tbl_islist(config) then
|
||||
if Util.islist(config) then
|
||||
for _, c in pairs(config) do
|
||||
vim.list_extend(properties, c.properties)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
local Settings = require("neoconf.settings")
|
||||
local Util = require("neoconf.util")
|
||||
|
||||
local M = {}
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ function M.to_schema(value)
|
|||
return { type = "number", default = value, description = "number" }
|
||||
end
|
||||
|
||||
if vim.tbl_islist(value) then
|
||||
if Util.islist(value) then
|
||||
return { type = "array", default = value, description = "array" }
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@ local Config = require("neoconf.config")
|
|||
|
||||
local M = {}
|
||||
|
||||
M.islist = vim.islist or vim.tbl_islist
|
||||
|
||||
function M.merge(...)
|
||||
local function can_merge(v)
|
||||
return type(v) == "table" and (vim.tbl_isempty(v) or not vim.tbl_islist(v))
|
||||
return type(v) == "table" and (vim.tbl_isempty(v) or not M.islist(v))
|
||||
end
|
||||
|
||||
local values = { ... }
|
||||
|
|
|
|||
Loading…
Reference in New Issue