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, config,
... ...
}: }:
with lib; let with lib;
cfg = config.plugins.haskell-scope-highlighting; helpers.vim-plugin.mkVimPlugin config {
in { name = "haskell-scope-highlighting";
options.plugins.haskell-scope-highlighting = { originalName = "haskell-scope-highlighting.nvim";
enable = mkEnableOption "haskell-scope-highlighting"; 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 { extraConfig = _: {
warnings = optional (!config.plugins.treesitter.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`. 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];
}; };
} }