mirror of
https://github.com/neovim/neovim.git
synced 2026-07-27 02:56:35 +00:00
fix(ftplugin): source inherited Lua ftplugins
Problem:
Vimscript ftplugins that inherit a base ftplugin often use explicit
`runtime! ftplugin/foo.vim` patterns. This skips corresponding Lua
ftplugins, unlike top-level ftplugin loading.
Solution:
Use the existing `{vim,lua}` patterns for bang runtime imports while
preserving each call's current lookup breadth.
This commit is contained in:
committed by
Christian Clason
parent
fd02e91319
commit
0bb2f5cc08
@@ -235,6 +235,18 @@ describe('runtime:', function()
|
||||
exec('setfiletype new-ft')
|
||||
eq('ABCDEFabcdef', eval('g:seq'))
|
||||
end)
|
||||
|
||||
it('inherited Vimscript ftplugins load bundled Lua ftplugins', function()
|
||||
exec('setfiletype objc')
|
||||
eq(1, eval([[b:undo_ftplugin =~# 'path<']]))
|
||||
end)
|
||||
|
||||
it('inherited Vimscript ftplugins load user Lua ftplugins', function()
|
||||
mkdir_p(ftplugin_folder)
|
||||
write_file(('%s/mail.lua'):format(ftplugin_folder), [[vim.b.mail_lua = 1]])
|
||||
exec('setfiletype gitsendemail')
|
||||
eq(1, eval([[get(b:, 'mail_lua', 0)]]))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('indent', function()
|
||||
|
||||
Reference in New Issue
Block a user