Fix warning about default snippets
Don't ignore runtime_dir, which is added in case snipmate compatibility is set. Fixes https://github.com/Shougo/neosnippet.vim/issues/432
This commit is contained in:
parent
924e01541c
commit
6384ba8e36
@ -55,12 +55,7 @@ endfunction
|
|||||||
function! neosnippet#variables#runtime_dir() abort
|
function! neosnippet#variables#runtime_dir() abort
|
||||||
" Set runtime dir.
|
" Set runtime dir.
|
||||||
let runtime_dir = split(globpath(&runtimepath, 'neosnippets'), '\n')
|
let runtime_dir = split(globpath(&runtimepath, 'neosnippets'), '\n')
|
||||||
if empty(runtime_dir) && empty(g:neosnippet#disable_runtime_snippets)
|
|
||||||
call neosnippet#util#print_error(
|
|
||||||
\ 'neosnippet default snippets cannot be loaded.')
|
|
||||||
call neosnippet#util#print_error(
|
|
||||||
\ 'You must install neosnippet-snippets or disable runtime snippets.')
|
|
||||||
endif
|
|
||||||
if g:neosnippet#enable_snipmate_compatibility
|
if g:neosnippet#enable_snipmate_compatibility
|
||||||
" Load snipMate snippet directories.
|
" Load snipMate snippet directories.
|
||||||
let runtime_dir += split(globpath(&runtimepath,
|
let runtime_dir += split(globpath(&runtimepath,
|
||||||
@ -70,6 +65,13 @@ function! neosnippet#variables#runtime_dir() abort
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if empty(runtime_dir) && empty(g:neosnippet#disable_runtime_snippets)
|
||||||
|
call neosnippet#util#print_error(
|
||||||
|
\ 'neosnippet default snippets cannot be loaded.')
|
||||||
|
call neosnippet#util#print_error(
|
||||||
|
\ 'You must install neosnippet-snippets or disable runtime snippets.')
|
||||||
|
endif
|
||||||
|
|
||||||
return map(runtime_dir, 'substitute(v:val, "[\\\\/]$", "", "")')
|
return map(runtime_dir, 'substitute(v:val, "[\\\\/]$", "", "")')
|
||||||
endfunction
|
endfunction
|
||||||
function! neosnippet#variables#data_dir() abort
|
function! neosnippet#variables#data_dir() abort
|
||||||
|
Loading…
Reference in New Issue
Block a user