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 = {}
|
local properties = {}
|
||||||
|
|
||||||
if vim.tbl_islist(config) then
|
if Util.islist(config) then
|
||||||
for _, c in pairs(config) do
|
for _, c in pairs(config) do
|
||||||
vim.list_extend(properties, c.properties)
|
vim.list_extend(properties, c.properties)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
local Settings = require("neoconf.settings")
|
local Settings = require("neoconf.settings")
|
||||||
|
local Util = require("neoconf.util")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
|
@ -57,7 +58,7 @@ function M.to_schema(value)
|
||||||
return { type = "number", default = value, description = "number" }
|
return { type = "number", default = value, description = "number" }
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.tbl_islist(value) then
|
if Util.islist(value) then
|
||||||
return { type = "array", default = value, description = "array" }
|
return { type = "array", default = value, description = "array" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@ local Config = require("neoconf.config")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
M.islist = vim.islist or vim.tbl_islist
|
||||||
|
|
||||||
function M.merge(...)
|
function M.merge(...)
|
||||||
local function can_merge(v)
|
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
|
end
|
||||||
|
|
||||||
local values = { ... }
|
local values = { ... }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue