Skip to content

Commit

Permalink
plugins/haskell-scope-highlighting: switch to mkVimPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Feb 18, 2024
1 parent 8e3b20f commit 2fe24d8
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions plugins/languages/haskell-scope-highlighting.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
'';
};
}

0 comments on commit 2fe24d8

Please sign in to comment.