fix(filetype): set default ft_ignore_pat in filetype.lua (#16917)

This default value is also set in filetype.vim, but if filetype.vim is
disabled the variable is never defined, which causes errors in some of
the dist#ft detection functions.
This commit is contained in:
Gregory Anders 2022-01-04 15:02:01 -07:00 committed by GitHub
parent 8ade8009ee
commit 60d3bb745d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ read_globals = {
"vim",
}
globals = {
"vim.g",
}
exclude_files = {
'test/functional/fixtures/lua/syntax_error.lua',
}

View File

@ -20,3 +20,7 @@ let g:did_load_ftdetect = 1
augroup END
]]
if not vim.g.ft_ignore_pat then
vim.g.ft_ignore_pat = "\\.\\(Z\\|gz\\|bz2\\|zip\\|tgz\\)$"
end