mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
chore: remove lockfile and update script
`main` branch and `parsers.lua` is the record of truth now
This commit is contained in:
parent
53d7118483
commit
44bb06bc12
2 changed files with 0 additions and 978 deletions
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env -S nvim -l
|
||||
vim.opt.runtimepath:append('.')
|
||||
local util = require('nvim-treesitter.util')
|
||||
local parsers = require('nvim-treesitter.parsers')
|
||||
|
||||
local filename = require('nvim-treesitter.install').get_package_path('lockfile.json')
|
||||
local lockfile = vim.json.decode(util.read_file(filename)) --[[@as table<string,{revision:string}>]]
|
||||
|
||||
for k, p in pairs(parsers) do
|
||||
if p.install_info then
|
||||
p.install_info.revision = lockfile[k].revision
|
||||
p.install_info.files = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- write new parser file
|
||||
local header = '---@type nvim-ts.parsers\nreturn '
|
||||
local parser_file = header .. vim.inspect(parsers)
|
||||
if vim.fn.executable('stylua') == 1 then
|
||||
parser_file = vim.system({ 'stylua', '-' }, { stdin = parser_file }):wait().stdout --[[@as string]]
|
||||
end
|
||||
util.write_file('lua/nvim-treesitter/parsers.lua', parser_file)
|
||||
Loading…
Add table
Add a link
Reference in a new issue