From 10e5066a9a794d584edbe244d2a1e643fc3aa271 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 24 Jul 2024 21:09:54 -0500 Subject: [PATCH] plugins/otter: add warning if treesitter highlighting not set --- plugins/languages/otter.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/languages/otter.nix b/plugins/languages/otter.nix index 575661aa..59d4cb8c 100644 --- a/plugins/languages/otter.nix +++ b/plugins/languages/otter.nix @@ -83,4 +83,14 @@ helpers.neovim-plugin.mkNeovimPlugin config { 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. + ''; + }; + }