plugins/refactoring: add telescope option

refactoring.nvim comes with a telescope picker that can be used via

```lua
require('telescope').extensions.refactoring.refactors
```
This commit is contained in:
Matt Sturgeon 2024-05-24 17:42:44 +01:00
parent 61cc6e9f22
commit beb86eec7c
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 27 additions and 0 deletions

View file

@ -22,6 +22,24 @@ helpers.neovim-plugin.mkNeovimPlugin config {
"extractVarStatements"
];
extraOptions = {
enableTelescope = mkEnableOption "telescope integration";
};
extraConfig = cfg: {
assertions = [
{
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
message = ''
Nixvim: You have enabled the `telescope` integration with refactoring-nvim.
However, you have not enabled the `telescope` plugin itself (`plugins.telescope.enable = true`).
'';
}
];
plugins.telescope.enabledExtensions = mkIf cfg.enableTelescope [ "refactoring" ];
};
settingsOptions = with helpers.nixvimTypes; {
prompt_func_return_type =
helpers.defaultNullOpts.mkAttrsOf bool