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:
parent
822e21e5b3
commit
24d2ac2373
2 changed files with 108 additions and 0 deletions
40
plugins/by-name/venv-selector/default.nix
Normal file
40
plugins/by-name/venv-selector/default.nix
Normal 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"
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue