Move get-known-sytaxes back into base.vim
This commit is contained in:
parent
66626ad415
commit
f5e1cbe721
@ -8,6 +8,23 @@ if exists("g:loaded_vimwiki_auto") || &cp
|
||||
endif
|
||||
let g:loaded_vimwiki_auto = 1
|
||||
|
||||
" s:vimwiki_get_known_syntaxes
|
||||
function! s:vimwiki_get_known_syntaxes() " {{{
|
||||
" Getting all syntaxes that different wikis could have
|
||||
let syntaxes = {}
|
||||
let syntaxes['default'] = 1
|
||||
for wiki in g:vimwiki_list
|
||||
if has_key(wiki, 'syntax')
|
||||
let syntaxes[wiki.syntax] = 1
|
||||
endif
|
||||
endfor
|
||||
" append map g:vimwiki_ext2syntax
|
||||
for syn in values(g:vimwiki_ext2syntax)
|
||||
let syntaxes[syn] = 1
|
||||
endfor
|
||||
return keys(syntaxes)
|
||||
endfunction " }}}
|
||||
|
||||
" vimwiki#base#apply_wiki_options
|
||||
function! vimwiki#base#apply_wiki_options(options) " {{{ Update the current
|
||||
" wiki using the options dictionary
|
||||
@ -1905,7 +1922,7 @@ endfunction " }}}
|
||||
|
||||
" -------------------------------------------------------------------------
|
||||
" Load syntax-specific Wiki functionality
|
||||
for s:syn in VimwikiGetKnownSyntaxes()
|
||||
for s:syn in s:vimwiki_get_known_syntaxes()
|
||||
execute 'runtime! autoload/vimwiki/'.s:syn.'_base.vim'
|
||||
endfor
|
||||
" -------------------------------------------------------------------------
|
||||
|
@ -374,22 +374,6 @@ function! VimwikiGetKnownExtensions() " {{{
|
||||
return keys(extensions)
|
||||
endfunction " }}}
|
||||
|
||||
function! VimwikiGetKnownSyntaxes() " {{{
|
||||
" Getting all syntaxes that different wikis could have
|
||||
let syntaxes = {}
|
||||
let syntaxes['default'] = 1
|
||||
for wiki in g:vimwiki_list
|
||||
if has_key(wiki, 'syntax')
|
||||
let syntaxes[wiki.syntax] = 1
|
||||
endif
|
||||
endfor
|
||||
" append map g:vimwiki_ext2syntax
|
||||
for syn in values(g:vimwiki_ext2syntax)
|
||||
let syntaxes[syn] = 1
|
||||
endfor
|
||||
return keys(syntaxes)
|
||||
endfunction " }}}
|
||||
|
||||
" }}}
|
||||
|
||||
" CALLBACK functions "{{{
|
||||
|
Loading…
Reference in New Issue
Block a user