From ca37e5af4baf0432094c394e93331a3911bb6e28 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 3 May 2026 10:23:56 +0200 Subject: [PATCH] refactor(ts): make build a local function --- lua/ts.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/ts.lua b/lua/ts.lua index 3b1274e..d4ba665 100644 --- a/lua/ts.lua +++ b/lua/ts.lua @@ -57,7 +57,7 @@ end ---@param repo ow.TS.Repo ---@param parser ow.TS.Parser -function M.build(repo, parser) +local function build(repo, parser) local path = assert(repo.path, "repo not installed: " .. repo.name) local cwd = parser.location and vim.fs.joinpath(path, parser.location) or path @@ -223,7 +223,7 @@ function M.setup(opts) pack.register_hook(repo.name, function(ev) repo.path = ev.path for _, parser in ipairs(repo.parsers) do - M.build(repo, parser) + build(repo, parser) end end) if not repo.path then @@ -233,7 +233,7 @@ function M.setup(opts) for _, parser in ipairs(repo.parsers) do local so = parser_so(repo.path, parser.lang) if changed[repo.name] or not vim.uv.fs_stat(so) then - M.build(repo, parser) + build(repo, parser) else vim.treesitter.language.add(parser.lang, { path = so }) end