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: { extraConfig = cfg: {
warnings = 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. NixVim(plugins.otter): you have enabled otter, but treesitter syntax highlighting is not enabled.
Otter functionality might not work as expected without it and `plugins.treesitter.enable` 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 '' plugins.lsp.onAttach = lib.mkIf cfg.autoActivate ''

View file

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