Skip to content

Commit 10e5066

Browse files
committed
plugins/otter: add warning if treesitter highlighting not set
1 parent 9113038 commit 10e5066

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/languages/otter.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,14 @@ helpers.neovim-plugin.mkNeovimPlugin config {
8383
When true, otter handles these cases fully. This is a (minor) performance hit.
8484
'';
8585
};
86+
87+
extraConfig = cfg: {
88+
warnings =
89+
lib.optional (cfg.enable && config.plugins.treesitter.settings.highlight.enable == null)
90+
''
91+
NixVim(plugins.otter): you have enabled otter, but `plugins.treesitter.settings.highlight.enable` is not enabled.
92+
Otter functionality might not work as expected without it and `plugins.treesitter.enable` enabled.
93+
'';
94+
};
95+
8696
}

0 commit comments

Comments
 (0)