plugins/otter: add warning if treesitter highlighting not set

This commit is contained in:
Austin Horstman 2024-07-24 21:09:54 -05:00
parent 91130385ed
commit 10e5066a9a
No known key found for this signature in database

View file

@ -83,4 +83,14 @@ helpers.neovim-plugin.mkNeovimPlugin config {
When true, otter handles these cases fully. This is a (minor) performance hit. When true, otter handles these cases fully. This is a (minor) performance hit.
''; '';
}; };
extraConfig = cfg: {
warnings =
lib.optional (cfg.enable && config.plugins.treesitter.settings.highlight.enable == null)
''
NixVim(plugins.otter): you have enabled otter, but `plugins.treesitter.settings.highlight.enable` is not enabled.
Otter functionality might not work as expected without it and `plugins.treesitter.enable` enabled.
'';
};
} }