fix: avoid installing parsers multiple times when using auto_install

This commit is contained in:
smjonas 2022-07-08 20:59:59 +02:00 committed by Stephan Seitz
parent 599fd416c8
commit 013c744b06

View file

@ -430,8 +430,8 @@ function M.setup_auto_install()
pattern = { "*" },
callback = function()
local lang = parsers.get_buf_lang()
if parsers.get_parser_configs()[lang] and not parsers.has_parser(lang) then
install { ask_reinstall = true } { lang }
if parsers.get_parser_configs()[lang] and not is_installed(lang) then
install() { lang }
end
end,
})