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, '\.')
|
for name in split(s, '\.')
|
||||||
" Load Lua ftplugins after Vim ftplugins _per directory_
|
" Load Lua ftplugins after Vim ftplugins _per directory_
|
||||||
" TODO(clason): use nvim__get_runtime when supports globs and modeline
|
" 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
|
||||||
exe printf('runtime! ftplugin/%s_*.vim ftplugin/%s_*.lua', name, name)
|
\ ftplugin/%s_*.vim ftplugin/%s_*.lua
|
||||||
exe printf('runtime! ftplugin/%s/*.vim ftplugin/%s/*.lua', name, name)
|
\ ftplugin/%s/*.vim ftplugin/%s/*.lua',
|
||||||
|
\ name, name, name, name, name, name)
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
Loading…
Reference in New Issue
Block a user