mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(ftplugin): respect runtimepath ordering
Problem: bundled `ftplugin/foo/*.vim` are sourced before user `ftplugin/foo.vim`. Solution: call `runtime!` once on all patterns to be sourced. Followup to #23801. Fixes #24003.
This commit is contained in:
parent
8182384205
commit
502a7a0558
@ -30,9 +30,10 @@ 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', name, name)
|
||||
exe printf('runtime! ftplugin/%s_*.vim ftplugin/%s_*.lua', name, name)
|
||||
exe printf('runtime! ftplugin/%s/*.vim ftplugin/%s/*.lua', name, name)
|
||||
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)
|
||||
endfor
|
||||
endif
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user