1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

fix(rtp): fix default rpt

This commit is contained in:
Eric Wong 2024-05-15 09:36:54 +08:00
parent 77216853d9
commit 94c6282ba4

View File

@ -21,18 +21,18 @@ let g:_spacevim_root_dir = escape(fnamemodify(resolve(fnamemodify(expand('<sfile
\ || has('win64'))?'\':'/') . '?')), ':p:gs?[\\/]?/?'), ' ')
lockvar g:_spacevim_root_dir
if has('nvim')
let s:qtdir = split(&rtp, ',')[-1]
if s:qtdir =~# 'nvim-qt'
let &rtp = s:qtdir . ',' . g:_spacevim_root_dir . ',' . $VIMRUNTIME
else
let &rtp = g:_spacevim_root_dir . ',' . $VIMRUNTIME
endif
let rtps = [g:_spacevim_root_dir]
for rtp in split(&rtp, ',')
if rtp =~# 'nvim-qt'
call insert(rtps, 0, rtp)
else
call add(rtps, rtp)
endif
endfor
let &rtp = join(rtps, ',')
else
let &rtp = g:_spacevim_root_dir . ',' . $VIMRUNTIME
endif
if has('win32')
let &rtp = &rtp . ',' . fnamemodify($VIMRUNTIME, ':h:h:h') . '\lib\nvim'
endif
call SpaceVim#logger#info('Loading SpaceVim from: ' . g:_spacevim_root_dir)
call SpaceVim#logger#info('default rtp is:')
call map(split(&rtp, ','), 'SpaceVim#logger#info(" > " . v:val)')