plugins/haskell-scope-highlighting: switch to mkVimPlugin

This commit is contained in:
Gaetan Lepage 2024-02-16 13:58:03 +01:00 committed by Gaétan Lepage
parent 8e3b20f0d6
commit 2fe24d883e

View file

@ -5,20 +5,18 @@
config,
...
}:
with lib; let
cfg = config.plugins.haskell-scope-highlighting;
in {
options.plugins.haskell-scope-highlighting = {
enable = mkEnableOption "haskell-scope-highlighting";
with lib;
helpers.vim-plugin.mkVimPlugin config {
name = "haskell-scope-highlighting";
originalName = "haskell-scope-highlighting.nvim";
defaultPackage = pkgs.vimPlugins.haskell-scope-highlighting-nvim;
package = helpers.mkPackageOption "haskell-scope-highlighting" pkgs.vimPlugins.haskell-scope-highlighting-nvim;
};
maintainers = [lib.maintainers.GaetanLepage];
config = mkIf cfg.enable {
warnings = optional (!config.plugins.treesitter.enable) ''
Nixvim (plugins.haskell-scope-highlighting): haskell-scope-highlighting needs treesitter to function as intended. Please, enable it by setting `plugins.treesitter.enable` to `true`.
'';
extraPlugins = [cfg.package];
};
}
extraConfig = _: {
warnings = optional (!config.plugins.treesitter.enable) ''
Nixvim (plugins.haskell-scope-highlighting): haskell-scope-highlighting needs treesitter to function as intended.
Please, enable it by setting `plugins.treesitter.enable` to `true`.
'';
};
}