feat(runtime): Allow lua to be used in ftplugin

This commit is contained in:
shadmansaleh
2021-06-02 16:25:50 +06:00
parent 68be8b99cf
commit fd5e5d2715
3 changed files with 25 additions and 2 deletions

View File

@ -28,7 +28,9 @@ augroup filetypeplugin
" When there is a dot it is used to separate filetype names. Thus for
" "aaa.bbb" load "aaa" and then "bbb".
for name in split(s, '\.')
exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
" Load lua ftplugins
exe printf('runtime! ftplugin/%s.lua ftplugin/%s_*.lua ftplugin/%s/*.lua', name, name, name)
endfor
endif
endfunc