feat(nvim): add neotest plugin

This commit is contained in:
Moritz Böhme 2023-10-27 19:31:03 +02:00
parent 37ad1080e7
commit 844c7a9876
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
5 changed files with 53 additions and 18 deletions

View file

@ -621,6 +621,23 @@
"type": "github" "type": "github"
} }
}, },
"neotest-python": {
"flake": false,
"locked": {
"lastModified": 1698425037,
"narHash": "sha256-C3Dw+fl1QNYU9tg0fE52EzOqeGXxu1vq5SPmDnv2LD8=",
"owner": "MoritzBoehme",
"repo": "neotest-python",
"rev": "3c09dbafb0a1e3ac8b19eabc7157ec312cc2f2ee",
"type": "github"
},
"original": {
"owner": "MoritzBoehme",
"ref": "fix-runtimepath-search",
"repo": "neotest-python",
"type": "github"
}
},
"neovim-flake": { "neovim-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
@ -1091,6 +1108,7 @@
"hyprpaper": "hyprpaper", "hyprpaper": "hyprpaper",
"impermanence": "impermanence", "impermanence": "impermanence",
"master": "master", "master": "master",
"neotest-python": "neotest-python",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nix-lazy-nvim": "nix-lazy-nvim", "nix-lazy-nvim": "nix-lazy-nvim",
@ -1106,7 +1124,6 @@
"smartcolumn-nvim": "smartcolumn-nvim", "smartcolumn-nvim": "smartcolumn-nvim",
"stable": "stable", "stable": "stable",
"telekasten-nvim": "telekasten-nvim", "telekasten-nvim": "telekasten-nvim",
"telescope-nvim": "telescope-nvim",
"timers": "timers" "timers": "timers"
} }
}, },
@ -1248,22 +1265,6 @@
"type": "github" "type": "github"
} }
}, },
"telescope-nvim": {
"flake": false,
"locked": {
"lastModified": 1696709104,
"narHash": "sha256-v68sId4cWHneUaaYp2neVtBobNZo8lsxKoBhRF4yZrI=",
"owner": "nvim-telescope",
"repo": "telescope.nvim",
"rev": "5a747a9587e4bfc4ae086a38cc679fe54f983b69",
"type": "github"
},
"original": {
"owner": "nvim-telescope",
"repo": "telescope.nvim",
"type": "github"
}
},
"timers": { "timers": {
"inputs": { "inputs": {
"naersk": "naersk", "naersk": "naersk",

View file

@ -51,6 +51,8 @@
telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
none-ls-nvim.flake = false; none-ls-nvim.flake = false;
none-ls-nvim.url = "github:nvimtools/none-ls.nvim"; none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
neotest-python.flake = false;
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
# Hyprland # Hyprland
hypr-contrib.url = "github:hyprwm/contrib"; hypr-contrib.url = "github:hyprwm/contrib";

View file

@ -306,5 +306,25 @@ with builtins;
plugin = nvim-puppeteer; plugin = nvim-puppeteer;
lazy = false; # NOTE: plugin lazy-loads itself. lazy = false; # NOTE: plugin lazy-loads itself.
} }
{
plugin = neotest;
lazy = false;
keys = [
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
];
dependencies = [
{ plugin = plenary-nvim; }
{ plugin = FixCursorHold-nvim; }
# adapters
{
plugin = neotest-python;
conf = /* lua */ ''
vim.opt.runtimepath:append("${neotest-python}")
'';
}
];
conf = readFile ./lua/neotest.lua;
}
]; ];
} }

View file

@ -0,0 +1,7 @@
require("neotest").setup({
adapters = {
require("neotest-python")({
dap = { justMyCode = false },
}),
},
})

View file

@ -47,9 +47,14 @@ with lib.my;
src = inputs.nvim-puppeteer; src = inputs.nvim-puppeteer;
}; };
null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (a: { null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (_: {
version = mkVersionInput inputs.none-ls-nvim; version = mkVersionInput inputs.none-ls-nvim;
src = inputs.none-ls-nvim; src = inputs.none-ls-nvim;
}); });
neotest-python = prev.vimPlugins.neotest-python.overrideAttrs (_: {
version = mkVersionInput inputs.neotest-python;
src = inputs.neotest-python;
});
}; };
} }