mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/rest-nvim: add telescope integration
This commit is contained in:
parent
7484be88c7
commit
11c133e89e
2 changed files with 22 additions and 0 deletions
|
@ -415,6 +415,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
Sets up the filetype association of `.http` files to trigger treesitter support to enable `rest` functionality.
|
Sets up the filetype association of `.http` files to trigger treesitter support to enable `rest` functionality.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableTelescope = lib.mkEnableOption "telescope integration";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
|
@ -425,8 +427,17 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
Nixvim (plugins.rest): Requires the `http` parser from `plugins.treesitter`, please set `plugins.treesitter.enable`.
|
Nixvim (plugins.rest): Requires the `http` parser from `plugins.treesitter`, please set `plugins.treesitter.enable`.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
|
||||||
|
message = ''
|
||||||
|
Nixvim (plugins.rest): You have `plugins.rest.enableTelescope` set to true, but `plugins.telescope.enable` is false.
|
||||||
|
Either disable the telescope integration or enable telescope.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
extraConfigLua = lib.mkIf cfg.enableTelescope ''require("telescope").load_extension("rest")'';
|
||||||
|
|
||||||
extraPackages = [ cfg.curlPackage ];
|
extraPackages = [ cfg.curlPackage ];
|
||||||
|
|
||||||
filetype = lib.mkIf cfg.enableHttpFiletypeAssociation {
|
filetype = lib.mkIf cfg.enableHttpFiletypeAssociation {
|
||||||
|
|
|
@ -100,4 +100,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
telescope = {
|
||||||
|
plugins = {
|
||||||
|
rest = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
treesitter.enable = true;
|
||||||
|
telescope.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue