mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
plugins/haskell-scope-highlighting: init + test
Add warning for Treesitter dependency Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> add test for highlights, add package tweak warning message enable treesitter in tests suggested change
This commit is contained in:
parent
43f3cb7ab2
commit
3958364809
3 changed files with 51 additions and 2 deletions
24
plugins/languages/haskell-scope-highlighting.nix
Normal file
24
plugins/languages/haskell-scope-highlighting.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
helpers,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.haskell-scope-highlighting;
|
||||
in {
|
||||
options.plugins.haskell-scope-highlighting = {
|
||||
enable = mkEnableOption "haskell-scope-highlighting";
|
||||
|
||||
package = helpers.mkPackageOption "haskell-scope-highlighting" pkgs.vimPlugins.haskell-scope-highlighting-nvim;
|
||||
};
|
||||
|
||||
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];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue