mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
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:
parent
61cc6e9f22
commit
beb86eec7c
2 changed files with 27 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue