mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
feat: use LazyVim everywhere instead of require("lazyvim.util")
This commit is contained in:
parent
3a87c08cda
commit
7a5dbeae75
41 changed files with 188 additions and 229 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue