mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
host.vim: s:GetManifestPath(): Remove for-loop.
Without the for-loop it is easier to follow, more explicit, and fewer lines.
This commit is contained in:
parent
966f1abd8b
commit
4b0b391f9f
@ -126,13 +126,9 @@ function! s:GetManifestPath() abort
|
||||
return fnamemodify($NVIM_RPLUGIN_MANIFEST, ':p')
|
||||
endif
|
||||
|
||||
let preferred = has('win32')
|
||||
\ ? ['$LOCALAPPDATA', '~/AppData/Local']
|
||||
\ : ['$XDG_DATA_HOME', '~/.local/share']
|
||||
|
||||
for dest in preferred
|
||||
if dest[0] == '$' && !exists(dest)
|
||||
continue
|
||||
let dest = has('win32') ? '$LOCALAPPDATA' : '$XDG_DATA_HOME'
|
||||
if !exists(dest)
|
||||
let dest = has('win32') ? '~/AppData/Local' : '~/.local/share'
|
||||
endif
|
||||
|
||||
let dest = fnamemodify(expand(dest), ':p')
|
||||
@ -140,9 +136,7 @@ function! s:GetManifestPath() abort
|
||||
let dest .= 'nvim/'
|
||||
call mkdir(dest, 'p', 700)
|
||||
let manifest_base = dest
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
return manifest_base.'rplugin.vim'
|
||||
endfunction
|
||||
|
@ -130,9 +130,9 @@ like this: It's a way to provide IDE capabilities in Nvim while still keeping
|
||||
it fast and lightweight for general use. It's also analogous to the |:helptags|
|
||||
command.
|
||||
|
||||
Unless a path is set in the `$NVIM_RPLUGIN_MANIFEST` environment variable, the
|
||||
manifest will be written to a file named `rplugin.vim` in one of the following
|
||||
directories:
|
||||
*$NVIM_RPLUGIN_MANIFEST*
|
||||
Unless $NVIM_RPLUGIN_MANIFEST is set the manifest will be written to a file
|
||||
named `rplugin.vim` at:
|
||||
|
||||
Unix ~
|
||||
$XDG_DATA_HOME/nvim/ or ~/.local/share/nvim/
|
||||
|
Loading…
Reference in New Issue
Block a user