mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 00:48:58 +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"
|
"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; {
|
settingsOptions = with helpers.nixvimTypes; {
|
||||||
prompt_func_return_type =
|
prompt_func_return_type =
|
||||||
helpers.defaultNullOpts.mkAttrsOf bool
|
helpers.defaultNullOpts.mkAttrsOf bool
|
||||||
|
|
|
@ -28,6 +28,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
withTelescope = {
|
||||||
|
plugins.telescope.enable = true;
|
||||||
|
|
||||||
|
plugins.refactoring = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
plugins.refactoring = {
|
plugins.refactoring = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue