mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-21 11:14:40 +02:00
treewide: use mkAssertions where possible
This commit is contained in:
parent
12e658eca8
commit
ce82e5859d
14 changed files with 94 additions and 104 deletions
|
@ -137,17 +137,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
'';
|
||||
};
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.enableLspFormat -> config.plugins.lsp-format.enable;
|
||||
message = ''
|
||||
Nixvim: You have enabled the lsp-format integration with none-ls.
|
||||
However, you have not enabled `plugins.lsp-format` itself.
|
||||
Note: `plugins.none-ls.enableLspFormat` is enabled by default when `plugins.lsp-format` is enabled.
|
||||
`plugins.none-ls.enableLspFormat` definitions: ${lib.options.showDefs options.plugins.none-ls.enableLspFormat.definitionsWithLocations}
|
||||
'';
|
||||
}
|
||||
];
|
||||
assertions = lib.nixvim.mkAssertions "plugins.none-ls" {
|
||||
assertion = cfg.enableLspFormat -> config.plugins.lsp-format.enable;
|
||||
|
||||
message = ''
|
||||
You have enabled the lsp-format integration with none-ls.
|
||||
However, you have not enabled `plugins.lsp-format` itself.
|
||||
Note: `plugins.none-ls.enableLspFormat` is enabled by default when `plugins.lsp-format` is enabled.
|
||||
`plugins.none-ls.enableLspFormat` definitions: ${lib.options.showDefs options.plugins.none-ls.enableLspFormat.definitionsWithLocations}
|
||||
'';
|
||||
};
|
||||
|
||||
# We only do this here because of enableLspFormat
|
||||
plugins.none-ls.luaConfig.content = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue