From 0195aa79db845f22b5f98b27d3d30fdf57b6cecb Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 27 Mar 2025 08:05:19 -0500 Subject: [PATCH] vimPluginsUpdater: fix nvim-tree-sitter update Moving the update scripts to the utils directory and pointing back at the generated location --- .../{ => utils}/nvim-treesitter/update-shell.nix | 2 +- .../plugins/{ => utils}/nvim-treesitter/update.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) rename pkgs/applications/editors/vim/plugins/{ => utils}/nvim-treesitter/update-shell.nix (86%) rename pkgs/applications/editors/vim/plugins/{ => utils}/nvim-treesitter/update.py (91%) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update-shell.nix b/pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update-shell.nix similarity index 86% rename from pkgs/applications/editors/vim/plugins/nvim-treesitter/update-shell.nix rename to pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update-shell.nix index a81c4daa32f8..573c98993f3a 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update-shell.nix +++ b/pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update-shell.nix @@ -1,5 +1,5 @@ { - pkgs ? import ../../../../../.. { }, + pkgs ? import ../../../../../../.. { }, }: with pkgs; diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py b/pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update.py similarity index 91% rename from pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py rename to pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update.py index 8ed3cbffa1d3..7e6650ace1d2 100755 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py +++ b/pkgs/applications/editors/vim/plugins/utils/nvim-treesitter/update.py @@ -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)