From 49e18f81e5b2945531406db0f50965bdb44d5018 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Thu, 30 Nov 2023 20:09:48 -0500 Subject: [PATCH] Powershell stuff --- nix/base-system/flake.nix | 8 +++++++- nix/base-system/nvim-powershell.nix | 11 +++++++++++ nix/darwin/flake.lock | 6 +++--- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 nix/base-system/nvim-powershell.nix diff --git a/nix/base-system/flake.nix b/nix/base-system/flake.nix index 5965ef8..e23a9bf 100644 --- a/nix/base-system/flake.nix +++ b/nix/base-system/flake.nix @@ -41,6 +41,11 @@ inherit (pkgs.tree-sitter) buildGrammar; inherit (pkgs) fetchFromGitHub; }; + # TODO(jwall): When this actually builds we should use it. + #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { + # inherit (pkgs.tree-sitter) buildGrammar; + # inherit (pkgs) fetchFromGitHub; + #}; possession-nvim = pkgs.callPackage ./possession-nvim.nix { inherit (pkgs.vimUtils) buildVimPlugin; inherit (pkgs) fetchFromGitHub; @@ -58,7 +63,7 @@ "tree-sitter-ocaml" "tree-sitter-tlaplus" "tree-sitter-julia" - ] pkgs.tree-sitter.builtGrammars) ++ [nvim-treesitter-csharp]; + ] pkgs.tree-sitter.builtGrammars) ++ [nvim-treesitter-csharp nvim-treesitter-powershell]; in { imports = [ @@ -95,6 +100,7 @@ EOF"; nvim-tree-lua nvim-lspconfig packer-nvim + vim-ps1 vim-lsp vim-vsnip nvim-cmp diff --git a/nix/base-system/nvim-powershell.nix b/nix/base-system/nvim-powershell.nix new file mode 100644 index 0000000..42870dc --- /dev/null +++ b/nix/base-system/nvim-powershell.nix @@ -0,0 +1,11 @@ +{ buildGrammar, fetchFromGitHub }: +buildGrammar { + language = "powershell"; + version = "0.1.0"; + src = fetchFromGitHub { + owner = "powershell"; + repo = "tree-sitter-powershell"; + rev = "1ac090522cb339a6fd9d3ac915da01cb263d69e1"; + hash = "sha256-4zGTfscK1Sjo4iKd5Go3LHVpAhQCEWCptcX4wOrZaR8="; + }; +} diff --git a/nix/darwin/flake.lock b/nix/darwin/flake.lock index 7eed156..81adde1 100644 --- a/nix/darwin/flake.lock +++ b/nix/darwin/flake.lock @@ -36,12 +36,12 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-p2WicQAJv2Lg5BlawWZRsr5ZaVu/4DfXgdklCwFdXAw=", - "path": "/nix/store/jq4013rbmh1as40j3jcrw6rjjdrvjcs9-source/nix/base-system", + "narHash": "sha256-SbhOVB9/kEyllgEb6fB4ZtjP/0HwL9YmQAVLkblF4gA=", + "path": "/nix/store/ahbdwscz6zwdbwa1qnhpch2639qgmjgg-source/nix/base-system", "type": "path" }, "original": { - "path": "/nix/store/jq4013rbmh1as40j3jcrw6rjjdrvjcs9-source/nix/base-system", + "path": "/nix/store/ahbdwscz6zwdbwa1qnhpch2639qgmjgg-source/nix/base-system", "type": "path" } },