plugins/yaml-schema-detect: init

This commit is contained in:
FKouhai 2025-05-31 12:05:48 +02:00
parent 8b3a69cfea
commit 3e5fc2f93d
No known key found for this signature in database
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{
lib,
config,
options,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "yaml-schema-detect";
packPathName = "yaml-schema-detect.nvim";
package = "yaml-schema-detect-nvim";
description = ''
A Neovim plugin that automatically detects and applies YAML schemas for your YAML files using yaml-language-server (yamlls)
'';
extraConfig = cfg: {
warnings = lib.nixvim.mkWarnings "plugins.yaml-schema-detect" [
{
when = !config.plugins.which-key.enable;
message = ''
This plugin requires `plugins.which-key` to be enabled
${options.plugins.which-key.enable} = true;
'';
}
];
};
maintainers = [ lib.maintainers.FKouhai ];
}

View file

@ -0,0 +1,8 @@
{
# empty test case is not needed since having it would make the warning throw an error
# this plugin requires which-key
combine-plugins = {
plugins.which-key.enable = true;
plugins.yaml-schema-detect.enable = true;
};
}