plugins/otter: fix treesitter warning

This commit is contained in:
Austin Horstman 2024-12-11 14:53:47 -06:00
parent 2206328137
commit c7b109f5af
No known key found for this signature in database
2 changed files with 13 additions and 5 deletions

View file

@ -101,10 +101,12 @@ helpers.neovim-plugin.mkNeovimPlugin {
extraConfig = cfg: {
warnings =
lib.optional (cfg.enable && config.plugins.treesitter.settings.highlight.enable == null)
lib.optional
(config.plugins.treesitter.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.
NixVim(plugins.otter): you have enabled otter, but treesitter syntax highlighting is not enabled.
Otter functionality might not work as expected without it. Make sure `plugins.treesitter.settings.highlight.enable` and `plugins.treesitter.enable` are enabled.
'';
plugins.lsp.onAttach = lib.mkIf cfg.autoActivate ''

View file

@ -3,14 +3,20 @@
plugins = {
otter.enable = true;
# Avoid the warning
treesitter.settings.highlight.enable = true;
treesitter = {
enable = true;
settings.highlight.enable = true;
};
};
};
defaults = {
plugins = {
# Avoid the warning
treesitter.settings.highlight.enable = true;
treesitter = {
enable = true;
settings.highlight.enable = true;
};
otter = {
enable = true;