File tree Expand file tree Collapse file tree 3 files changed +6
-560
lines changed
Expand file tree Collapse file tree 3 files changed +6
-560
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ M.load = function() end
3131
3232--- @class down.mod..Config
3333M .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 )
119119end
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 ()
162160end
163161
You can’t perform that action at this time.
0 commit comments