mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/otter: fix treesitter warning
This commit is contained in:
parent
2206328137
commit
c7b109f5af
2 changed files with 13 additions and 5 deletions
|
@ -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 ''
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue