mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +02:00
plugins/hmts: add warning when treesitter is not enabled
This commit is contained in:
parent
889144c0b1
commit
d137555971
2 changed files with 13 additions and 12 deletions
|
@ -8,15 +8,19 @@
|
|||
with lib; let
|
||||
cfg = config.plugins.hmts;
|
||||
in {
|
||||
options.plugins.hmts =
|
||||
helpers.extraOptionsOptions
|
||||
// {
|
||||
meta.maintainers = [maintainers.GaetanLepage];
|
||||
|
||||
options.plugins.hmts = {
|
||||
enable = mkEnableOption "hmts.nvim";
|
||||
|
||||
package = helpers.mkPackageOption "hmts.nvim" pkgs.vimPlugins.hmts-nvim;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = optional (!config.plugins.treesitter.enable) [
|
||||
"Nixvim: treesitter-refactor needs treesitter to function as intended"
|
||||
];
|
||||
|
||||
extraPlugins = [cfg.package];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.hmts.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.hmts = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
hmts.enable = true;
|
||||
treesitter.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue