vimPluginsUpdater: fix nvim-tree-sitter update

Moving the update scripts to the utils directory and pointing back at
the generated location
This commit is contained in:
Austin Horstman
2025-03-27 08:09:45 -05:00
parent dfc26bfb08
commit 0195aa79db
2 changed files with 9 additions and 6 deletions
@@ -1,5 +1,5 @@
{
pkgs ? import ../../../../../.. { },
pkgs ? import ../../../../../../.. { },
}:
with pkgs;
@@ -3,11 +3,10 @@
import json
import logging
import subprocess
from concurrent.futures import ThreadPoolExecutor
import os
import subprocess
import sys
from os.path import join
from concurrent.futures import ThreadPoolExecutor
log = logging.getLogger("vim-updater")
@@ -61,7 +60,7 @@ def update_grammars(nvim_treesitter_dir: str):
log.debug("Running command: %s", ' '.join(cmd))
configs = json.loads(subprocess.check_output(cmd))
generated_file = """# generated by pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py
generated_file = """# generated by pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update.py
{ buildGrammar, """
@@ -95,4 +94,8 @@ def update_grammars(nvim_treesitter_dir: str):
if __name__ == "__main__":
generated = update_grammars(sys.argv[1])
open(join(os.path.dirname(__file__), "generated.nix"), "w").write(generated)
output_path = os.path.join(
os.path.dirname(__file__),
"../../nvim-treesitter/generated.nix"
)
open(output_path, "w").write(generated)