Skip to content

Commit

Permalink
plugins/neotest: add hardhat.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Mar 25, 2024
1 parent 4d471f0 commit d261b39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions plugins/neotest/adapters-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
gradle = {
treesitter-parser = "kotlin,java";
};
hardhat = {
treesitter-parser = "javascript";
packageName = "hardhat-nvim";
};
haskell = {
treesitter-parser = "haskell";
};
Expand Down
3 changes: 2 additions & 1 deletion plugins/neotest/adapters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ with lib; let

mkAdapter = name: {
treesitter-parser,
packageName ? "neotest-${name}",
settingsSuffix ? settingsLua: "(${settingsLua})",
}: {
options.plugins.neotest.adapters.${name} = {
enable = mkEnableOption name;

package = helpers.mkPackageOption name pkgs.vimPlugins."neotest-${name}";
package = helpers.mkPackageOption name pkgs.vimPlugins.${packageName};

settings = helpers.mkSettingsOption {
description = "settings for the `${name}` adapter.";
Expand Down
1 change: 1 addition & 0 deletions tests/test-sources/plugins/neotest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
foundry.enable = true;
go.enable = true;
gradle.enable = true;
hardhat.enable = true;
haskell.enable = true;
java.enable = true;
jest.enable = true;
Expand Down

0 comments on commit d261b39

Please sign in to comment.