fix(runtime): respect 'rtp' order for all runtime files (#24335)

This commit is contained in:
zeertzjq
2023-07-14 06:46:16 +08:00
committed by GitHub
parent a3f4598226
commit dbb840da01
10 changed files with 136 additions and 82 deletions

View File

@@ -30,10 +30,8 @@ augroup filetypeplugin
for name in split(s, '\.')
" Load Lua ftplugins after Vim ftplugins _per directory_
" TODO(clason): use nvim__get_runtime when supports globs and modeline
exe printf('runtime! ftplugin/%s.vim ftplugin/%s.lua
\ ftplugin/%s_*.vim ftplugin/%s_*.lua
\ ftplugin/%s/*.vim ftplugin/%s/*.lua',
\ name, name, name, name, name, name)
" XXX: "[.]" in the first pattern makes it a wildcard on Windows
exe $'runtime! ftplugin/{name}[.]{{vim,lua}} ftplugin/{name}_*.{{vim,lua}} ftplugin/{name}/*.{{vim,lua}}'
endfor
endif
endfunc