mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
fix(ftdetect): source plugins in autogroup (#18362)
(cherry picked from commit 244b371a18
)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
ffd46b7688
commit
508c8a597e
@@ -17,10 +17,14 @@ vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
|
||||
})
|
||||
|
||||
-- These *must* be sourced after the autocommand above is created
|
||||
vim.cmd [[
|
||||
runtime! ftdetect/*.vim
|
||||
runtime! ftdetect/*.lua
|
||||
]]
|
||||
if not vim.g.did_load_ftdetect then
|
||||
vim.cmd [[
|
||||
augroup filetypedetect
|
||||
runtime! ftdetect/*.vim
|
||||
runtime! ftdetect/*.lua
|
||||
augroup END
|
||||
]]
|
||||
end
|
||||
|
||||
-- Set a marker so that the ftdetect scripts are not sourced a second time by filetype.vim
|
||||
vim.g.did_load_ftdetect = 1
|
||||
|
Reference in New Issue
Block a user