mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
parent
e973a5cbb2
commit
754335b649
1 changed files with 5 additions and 1 deletions
|
|
@ -69,6 +69,10 @@ local function load_lockfile()
|
||||||
lockfile = vim.fn.filereadable(filename) == 1 and vim.fn.json_decode(vim.fn.readfile(filename)) or {}
|
lockfile = vim.fn.filereadable(filename) == 1 and vim.fn.json_decode(vim.fn.readfile(filename)) or {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function is_ignored_parser(lang)
|
||||||
|
return vim.tbl_contains(configs.get_ignored_parser_installs(), lang)
|
||||||
|
end
|
||||||
|
|
||||||
local function get_revision(lang)
|
local function get_revision(lang)
|
||||||
if #lockfile == 0 then
|
if #lockfile == 0 then
|
||||||
load_lockfile()
|
load_lockfile()
|
||||||
|
|
@ -477,7 +481,7 @@ function M.setup_auto_install()
|
||||||
pattern = { "*" },
|
pattern = { "*" },
|
||||||
callback = function()
|
callback = function()
|
||||||
local lang = parsers.get_buf_lang()
|
local lang = parsers.get_buf_lang()
|
||||||
if parsers.get_parser_configs()[lang] and not is_installed(lang) then
|
if parsers.get_parser_configs()[lang] and not is_installed(lang) and not is_ignored_parser(lang) then
|
||||||
install() { lang }
|
install() { lang }
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue