Skip to content

Commit 06e8ed8

Browse files
committed
workspace path fixed
1 parent 20b6d77 commit 06e8ed8

File tree

3 files changed

+6
-560
lines changed

3 files changed

+6
-560
lines changed

lua/down/mod/data/init.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ M.load = function() end
3131

3232
---@class down.mod..Config
3333
M.config = {
34-
path = vim.fn.stdpath("data") .. "/down.mpack",
34+
path = vim.fn.stdpath("data") .. "/down.json",
3535
dir = {
3636
vim = vim.fs.joinpath(vim.fn.stdpath("data"), "down/"),
3737
home = vim.fs.joinpath(os.getenv("HOME") or "~/", ".down/"),
@@ -115,7 +115,7 @@ M.sync = function()
115115
end
116116
local content = file:read("*a")
117117
file:close()
118-
M.data = vim.mpack.decode and vim.mpack.decode(content)
118+
M.data = vim.json.decode and vim.json.decode(content)
119119
end
120120

121121
--- Stores a key-value pair in the store
@@ -155,9 +155,7 @@ M.flush = function(path)
155155
if not file then
156156
return
157157
end
158-
file:write(
159-
vim.mpack.encode and vim.mpack.encode(M.data) or vim.mpack.pack(M.data)
160-
)
158+
file:write(vim.json.encode and vim.json.encode(M.data))
161159
file:close()
162160
end
163161

0 commit comments

Comments
 (0)