Allow additional filetypes to be registered to vimwiki files.

This options allow third party plugins to register and enable additonal
functionality by setting the filetype to vimwiki.other_ft.other_ft2 etc.
This option should be used with care since vimwiki functionality can be
overwritten by other plugins. See Issue #461 for an example use case.
This commit is contained in:
Rane Brown
2019-04-12 07:42:49 -06:00
parent ae67790ad5
commit 1e74443b5a
6 changed files with 49 additions and 8 deletions

View File

@ -89,7 +89,7 @@ function! s:setup_new_wiki_buffer()
" this makes that ftplugin/vimwiki.vim and afterwards syntax/vimwiki.vim are
" sourced
setfiletype vimwiki
call vimwiki#u#ft_set()
endfunction
@ -102,8 +102,8 @@ function! s:setup_buffer_enter()
return
endif
if &filetype != 'vimwiki'
setfiletype vimwiki
if !vimwiki#u#ft_is_vw()
call vimwiki#u#ft_set()
endif
call s:set_global_options()