From 2fdf59a63d07f790dfe34637bc70fd22626bd64e Mon Sep 17 00:00:00 2001 From: iofq Date: Sun, 19 Oct 2025 13:39:47 -0500 Subject: [PATCH] push built grammars to cachix --- .github/workflows/main.yaml | 6 ++++++ README.md | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6627c39..d2619af 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,6 +9,12 @@ jobs: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/flakehub-cache-action@main + - uses: cachix/cachix-action@master + if: github.ref == 'refs/heads/master' + with: + name: nvim-treesitter-main + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix flake check - run: nix run nixpkgs#nixfmt **/*.nix diff --git a/README.md b/README.md index 88bf18a..d948e4b 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,24 @@ overlays = [ If you need the unpatched `nvim-treesitter` plugin without any parsers/queries bundled, even after you overlay it, you can use the `nvim-treesitter-unwrapped` output of this overlay. +## Cache + +Add our `cachix` repo to avoid needing to build grammars locally. + +```nix + nix = { + settings = { + substituters = [ + "https://nvim-treesitter-main.cachix.org" + ]; + trusted-public-keys = [ + "nvim-treesitter-main.cachix.org-1:cbwE6blfW5+BkXXyeAXoVSu1gliqPLHo2m98E4hWfZQ=" + ]; + }; + }; +``` + + ## Updating To update the list of parsers in `generated.nix`: