plugins/otter: consider both the new and the old treesitter api
This commit is contained in:
parent
1787eeda5a
commit
77a302b98f
1 changed files with 6 additions and 2 deletions
|
|
@ -83,11 +83,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
warnings = lib.nixvim.mkWarnings "plugins.otter" {
|
warnings = lib.nixvim.mkWarnings "plugins.otter" {
|
||||||
when =
|
when =
|
||||||
config.plugins.treesitter.enable -> config.plugins.treesitter.settings.highlight.enable == null;
|
let
|
||||||
|
inherit (config.plugins) treesitter;
|
||||||
|
highlightEnabled = treesitter.highlight.enable || (treesitter.settings.highlight.enable or false);
|
||||||
|
in
|
||||||
|
config.plugins.treesitter.enable -> highlightEnabled == null;
|
||||||
|
|
||||||
message = ''
|
message = ''
|
||||||
You have enabled otter, but treesitter syntax highlighting is not enabled.
|
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.
|
Otter functionality might not work as expected without it. Make sure `plugins.treesitter.highlight.enable` and `plugins.treesitter.enable` are enabled.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue