Unverified Commit 35a59011 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

vimPluginsUpdater: fix nvim-tree-sitter update (#393721)

parents 3272eda1 0195aa79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  pkgs ? import ../../../../../.. { },
  pkgs ? import ../../../../../../.. { },
}:

with pkgs;
+8 −5
Original line number Diff line number Diff line
@@ -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)