1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-15 08:09:11 +08:00

pref(a.lua): add debug information

This commit is contained in:
Shidong Wang 2021-11-04 18:44:50 +08:00
parent 5cd0cb78b0
commit afec95b027
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -1,3 +1,12 @@
--=============================================================================
-- a.lua --- alternate plugin for SpaceVim
-- Copyright (c) 2016-2019 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
local M = {}
local sp = require('spacevim')
local cmp = require('spacevim.api').import('vim.compatible')
@ -16,7 +25,13 @@ local cache_path = sp_file.unify_path(sp_opt.data_dir, ':p') .. 'SpaceVim/a.json
local project_config = {}
local function cache()
fn.writefile({sp_json.json_encode(project_config)}, sp_file.unify_path(cache_path, ':p'))
logger.debug('write cache into file:' .. cache_path)
local rst = fn.writefile({sp_json.json_encode(project_config)}, cache_path)
if rst == 0 then
logger.debug('cache succeeded!')
else
logger.debug('cache failed!')
end
end
local function get_type_path(a, f, b)