mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 10:48:35 +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
|
with lib; let
|
||||||
cfg = config.plugins.hmts;
|
cfg = config.plugins.hmts;
|
||||||
in {
|
in {
|
||||||
options.plugins.hmts =
|
meta.maintainers = [maintainers.GaetanLepage];
|
||||||
helpers.extraOptionsOptions
|
|
||||||
// {
|
|
||||||
enable = mkEnableOption "hmts.nvim";
|
|
||||||
|
|
||||||
package = helpers.mkPackageOption "hmts.nvim" pkgs.vimPlugins.hmts-nvim;
|
options.plugins.hmts = {
|
||||||
};
|
enable = mkEnableOption "hmts.nvim";
|
||||||
|
|
||||||
|
package = helpers.mkPackageOption "hmts.nvim" pkgs.vimPlugins.hmts-nvim;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
warnings = optional (!config.plugins.treesitter.enable) [
|
||||||
|
"Nixvim: treesitter-refactor needs treesitter to function as intended"
|
||||||
|
];
|
||||||
|
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [cfg.package];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
plugins.hmts.enable = true;
|
plugins = {
|
||||||
};
|
hmts.enable = true;
|
||||||
|
treesitter.enable = true;
|
||||||
example = {
|
|
||||||
plugins.hmts = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue