mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
fix(cache): use data_dir for SpaceVim cache
ref: https://github.com/SpaceVim/SpaceVim/issues/4499
This commit is contained in:
parent
7e77fd9fb4
commit
07e6c2f9f4
@ -772,8 +772,8 @@ function! SpaceVim#layers#core#statusline#config() abort
|
|||||||
\ 'main': 'SpaceVim#layers#core#statusline#ctrlp',
|
\ 'main': 'SpaceVim#layers#core#statusline#ctrlp',
|
||||||
\ 'prog': 'SpaceVim#layers#core#statusline#ctrlp_status',
|
\ 'prog': 'SpaceVim#layers#core#statusline#ctrlp_status',
|
||||||
\ }
|
\ }
|
||||||
if filereadable(expand('~/.cache/SpaceVim/major_mode.json'))
|
if filereadable(expand(g:spacevim_data_dir . 'SpaceVim/major_mode.json'))
|
||||||
let conf = s:JSON.json_decode(join(readfile(expand('~/.cache/SpaceVim/major_mode.json'), ''), ''))
|
let conf = s:JSON.json_decode(join(readfile(expand(g:spacevim_data_dir . 'SpaceVim/major_mode.json'), ''), ''))
|
||||||
for key in keys(conf)
|
for key in keys(conf)
|
||||||
if conf[key]
|
if conf[key]
|
||||||
" this function should be called silent.
|
" this function should be called silent.
|
||||||
@ -788,7 +788,7 @@ function! s:update_conf() abort
|
|||||||
for key in keys(s:modes)
|
for key in keys(s:modes)
|
||||||
call extend(conf, {key : (index(s:loaded_modes, key) > -1 ? 1 : 0)})
|
call extend(conf, {key : (index(s:loaded_modes, key) > -1 ? 1 : 0)})
|
||||||
endfor
|
endfor
|
||||||
call writefile([s:JSON.json_encode(conf)], expand('~/.cache/SpaceVim/major_mode.json'))
|
call writefile([s:JSON.json_encode(conf)], expand(g:spacevim_data_dir . 'SpaceVim/major_mode.json'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Arguments:
|
" Arguments:
|
||||||
|
@ -39,7 +39,7 @@ let s:FILE = SpaceVim#api#import('file')
|
|||||||
|
|
||||||
let s:gtagslabel = ''
|
let s:gtagslabel = ''
|
||||||
let s:auto_update = 1
|
let s:auto_update = 1
|
||||||
let g:tags_cache_dir = '~/.cache/SpaceVim/tags/'
|
let g:tags_cache_dir = g:spacevim_data_dir . 'SpaceVim/tags/'
|
||||||
let g:gtags_open_list = 2
|
let g:gtags_open_list = 2
|
||||||
|
|
||||||
function! SpaceVim#layers#gtags#plugins() abort
|
function! SpaceVim#layers#gtags#plugins() abort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user