1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

renaming variables

This commit is contained in:
jdhao 2021-12-15 00:21:34 +08:00
parent 5215a601b9
commit bbd642af1a
2 changed files with 6 additions and 6 deletions

View File

@ -193,12 +193,12 @@ function! utils#MultiEdit(patterns) abort
endfunction
function! utils#add_pack(name) abort
let l:success = v:true
let l:status = v:true
try
execute printf("packadd! %s", a:name)
catch /^Vim\%((\a\+)\)\=:E919/
let l:success = v:false
let l:status = v:false
endtry
return l:success
return l:status
endfunction

View File

@ -61,7 +61,7 @@ let s:theme2dir = {
\ 'nord': 'nord.nvim',
\ 'doom_one': 'doom-one.nvim',
\ 'everforest' :'everforest',
\ 'nightfox': 'nightfox.nvim'
\ 'nightfox': 'nightfox.nvim',
\ }
let s:theme = utils#RandElement(keys(s:theme2dir))
@ -73,8 +73,8 @@ if !has_key(s:theme_setup_dict, s:theme)
finish
endif
let s:res = utils#add_pack(s:theme2dir[s:theme])
if !s:res
let s:status = utils#add_pack(s:theme2dir[s:theme])
if !s:status
echomsg printf("Theme %s not installed. Run PackerSync to install.", s:theme)
finish
endif