From 2664a47219e9c7a6da5b2bb614cf5a6436476854 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Fri, 5 Jan 2024 16:07:20 -0500 Subject: [PATCH] Pin treesitter-context to a version that will build with nix infra. --- nix/base-system/flake.nix | 10 ++++++++++ nix/base-system/init.lua | 2 +- nix/darwin/flake.lock | 26 ++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/nix/base-system/flake.nix b/nix/base-system/flake.nix index 56d716b..25146b0 100644 --- a/nix/base-system/flake.nix +++ b/nix/base-system/flake.nix @@ -18,6 +18,11 @@ url = "github:ThePrimeagen/harpoon/harpoon2"; flake = false; }; + # We need to pin to this version of treesitter because it breaks after this revision + treesitter-context = { + url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23"; + flake = false; + }; }; outputs = { sile-flake, @@ -29,6 +34,7 @@ nil-flake, nurl-flake, harpoon-src, + treesitter-context, nixpkgs, ... # We don't use the self or nixpkgs args here so we just glob it. }: { @@ -50,6 +56,10 @@ inherit (pkgs.vimUtils) buildVimPluginFrom2Nix; harpoonSrc = harpoon-src; }; + nvim-treesitter-context = pkgs.vimUtils.buildVimPluginFrom2Nix { + name = "nvim-treesitter-context"; + src = treesitter-context; + }; # TODO(jwall): When this actually builds we should use it. #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { # inherit (pkgs.tree-sitter) buildGrammar; diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index 138d912..b760bf5 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -111,7 +111,7 @@ cmp.setup({ --vim.lsp.set_log_level('trace') --vim.lsp.log.set_format_func(vim.inspect) -local roslyn_lsp_dll = vim.fs.normlize("~/bin/Microsoft.CodeAnalysis.LanguageServer.dll") +local roslyn_lsp_dll = vim.fs.normalize("~/bin/Microsoft.CodeAnalysis.LanguageServer.dll") local caps = vim.tbl_deep_extend( 'force', diff --git a/nix/darwin/flake.lock b/nix/darwin/flake.lock index e13f0ee..c15e241 100644 --- a/nix/darwin/flake.lock +++ b/nix/darwin/flake.lock @@ -31,16 +31,17 @@ "nurl-flake": "nurl-flake", "runwhen-flake": "runwhen-flake", "rust-overlay-flake": "rust-overlay-flake", - "sile-flake": "sile-flake" + "sile-flake": "sile-flake", + "treesitter-context": "treesitter-context" }, "locked": { "lastModified": 1, - "narHash": "sha256-ddk9o6CPZv/kDzOjgtQHaOi2sDuCv6LXUGblWMRK5DY=", - "path": "/nix/store/hfmdmfna3pcvhjdk2kw2xiz1ppmm8a3l-source/nix/base-system", + "narHash": "sha256-h8APs3KV8oU8sWYFEpSpqFjqJ/QY2a2L90BDfad5VUo=", + "path": "/nix/store/0jd7ginq0vz1gglni90j5bzj4bk4ly7q-source/nix/base-system", "type": "path" }, "original": { - "path": "/nix/store/hfmdmfna3pcvhjdk2kw2xiz1ppmm8a3l-source/nix/base-system", + "path": "/nix/store/0jd7ginq0vz1gglni90j5bzj4bk4ly7q-source/nix/base-system", "type": "path" } }, @@ -744,6 +745,23 @@ "repo": "default", "type": "github" } + }, + "treesitter-context": { + "flake": false, + "locked": { + "lastModified": 1693236978, + "narHash": "sha256-B6BXeFEWxTFf46JrlatsxEQcC6+/hPIDBb5cIcJpLZg=", + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-context", + "rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23", + "type": "github" + }, + "original": { + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-context", + "rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23", + "type": "github" + } } }, "root": "root",