2022-04-14 12:01:23 +08:00
|
|
|
-- Execute as `nvim --headless -c "luafile ./scripts/write-lockfile.lua"`
|
2023-06-18 14:17:38 +08:00
|
|
|
|
|
|
|
---@type string|any[]
|
2022-04-14 12:01:23 +08:00
|
|
|
local skip_langs = vim.fn.getenv "SKIP_LOCKFILE_UPDATE_FOR_LANGS"
|
2023-06-18 14:17:38 +08:00
|
|
|
|
2022-04-14 12:01:23 +08:00
|
|
|
if skip_langs == vim.NIL then
|
|
|
|
skip_langs = {}
|
|
|
|
else
|
2023-06-18 14:17:38 +08:00
|
|
|
---@diagnostic disable-next-line: param-type-mismatch
|
2022-04-14 12:01:23 +08:00
|
|
|
skip_langs = vim.fn.split(skip_langs, ",")
|
|
|
|
end
|
2023-06-18 14:17:38 +08:00
|
|
|
|
2022-04-14 12:01:23 +08:00
|
|
|
print("Skipping languages: " .. vim.inspect(skip_langs))
|
|
|
|
require("nvim-treesitter.install").write_lockfile("verbose", skip_langs)
|
|
|
|
vim.cmd "q"
|