mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(filetype): source ftdetect/* after creating scripts.vim autocmds (#29445)
This commit is contained in:
@ -39,15 +39,6 @@ vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile', 'StdinReadPost' }, {
|
||||
end,
|
||||
})
|
||||
|
||||
-- These *must* be sourced after the autocommand above is created
|
||||
if not vim.g.did_load_ftdetect then
|
||||
vim.cmd([[
|
||||
augroup filetypedetect
|
||||
runtime! ftdetect/*.{vim,lua}
|
||||
augroup END
|
||||
]])
|
||||
end
|
||||
|
||||
-- Set up the autocmd for user scripts.vim
|
||||
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
group = 'filetypedetect',
|
||||
@ -62,3 +53,10 @@ vim.api.nvim_create_autocmd('StdinReadPost', {
|
||||
if not vim.g.ft_ignore_pat then
|
||||
vim.g.ft_ignore_pat = '\\.\\(Z\\|gz\\|bz2\\|zip\\|tgz\\)$'
|
||||
end
|
||||
|
||||
-- These *must* be sourced after the autocommands above are created
|
||||
vim.cmd([[
|
||||
augroup filetypedetect
|
||||
runtime! ftdetect/*.{vim,lua}
|
||||
augroup END
|
||||
]])
|
||||
|
Reference in New Issue
Block a user