mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 09:04:54 +02:00
treewide: use mkWarnings where possible
This commit is contained in:
parent
abba4af10b
commit
12e658eca8
34 changed files with 309 additions and 225 deletions
|
@ -100,14 +100,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
lib.optional
|
||||
(config.plugins.treesitter.enable -> config.plugins.treesitter.settings.highlight.enable == null)
|
||||
warnings = lib.nixvim.mkWarnings "plugins.otter" {
|
||||
when =
|
||||
config.plugins.treesitter.enable -> config.plugins.treesitter.settings.highlight.enable == null;
|
||||
|
||||
''
|
||||
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.
|
||||
'';
|
||||
message = ''
|
||||
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 ''
|
||||
require('otter').activate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue