feat: use LazyVim everywhere instead of require("lazyvim.util")
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
local Config = require("lazyvim.config")
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
---@class lazyvim.util.json
|
||||
local M = {}
|
||||
@@ -14,7 +13,7 @@ local function encode(value, indent)
|
||||
elseif t == "number" or t == "boolean" then
|
||||
return tostring(value)
|
||||
elseif t == "table" then
|
||||
local is_list = Util.is_list(value)
|
||||
local is_list = LazyVim.is_list(value)
|
||||
local parts = {}
|
||||
local next_indent = indent .. " "
|
||||
|
||||
@@ -51,13 +50,13 @@ function M.save()
|
||||
local path = vim.fn.stdpath("config") .. "/lazyvim.json"
|
||||
local f = io.open(path, "w")
|
||||
if f then
|
||||
f:write(Util.json.encode(Config.json.data))
|
||||
f:write(LazyVim.json.encode(Config.json.data))
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
|
||||
function M.migrate()
|
||||
Util.info("Migrating `lazyvim.json` to version `" .. Config.json.version .. "`")
|
||||
LazyVim.info("Migrating `lazyvim.json` to version `" .. Config.json.version .. "`")
|
||||
local json = Config.json
|
||||
|
||||
-- v0
|
||||
|
||||
Reference in New Issue
Block a user