1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

plugins/venv-selector: init

This commit is contained in:
Gaetan Lepage 2025-10-26 00:39:23 +02:00 committed by Gaétan Lepage
parent 822e21e5b3
commit 24d2ac2373
2 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,40 @@
{
lib,
config,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "venv-selector";
package = "venv-selector-nvim";
maintainers = [ lib.maintainers.GaetanLepage ];
dependencies = [
"fd"
];
settingsExample = {
name = [
"venv"
".venv"
];
dap_enabled = true;
pyenv_path = lib.nixvim.nestedLiteralLua "vim.fn.expand('$HOME/.pyenv/versions')";
};
extraConfig = cfg: {
warnings = lib.nixvim.mkWarnings "plugins.venv-selector" (
lib.map
(pickerName: {
when = (cfg.settings.picker or null) == pickerName && !config.plugins.${pickerName}.enable;
message = ''
You have to enable `plugins.${pickerName}` as `settings.picker` is set to `"${pickerName}"`.
'';
})
[
"telescope"
"fzf-lua"
]
);
};
}