This commit is contained in:
patrick96 2021-11-20 22:34:11 +01:00 committed by Stephan Seitz
parent e8bde2fe61
commit d2174f1d29
2 changed files with 3 additions and 4 deletions

View file

@ -352,11 +352,11 @@ function M.is_enabled(mod, lang, bufnr)
end
local disable = module_config.disable
if type(disable) == 'function' then
if type(disable) == "function" then
if disable(lang, bufnr) then
return false
end
elseif type(disable) == 'table' then
elseif type(disable) == "table" then
-- Otherwise it's a list of languages
for _, parser in pairs(disable) do
if lang == parser then
@ -365,7 +365,6 @@ function M.is_enabled(mod, lang, bufnr)
end
end
return true
end