mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 02:34:34 +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
|
@ -231,29 +231,27 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
!(
|
||||
# leanls lsp server is disabled in nvim-lspconfig
|
||||
config.plugins.lsp.servers.leanls.enable
|
||||
# lsp is not (!) disabled in the lean.nvim plugin
|
||||
&& !(
|
||||
# lsp is explicitly set to `false`.
|
||||
(isBool cfg.lsp.enable) && !cfg.lsp.enable
|
||||
)
|
||||
);
|
||||
message = ''
|
||||
You have not explicitly set `plugins.lean.lsp` to `false` while having `plugins.lsp.servers.leanls.enable` set to `true`.
|
||||
You need to either
|
||||
assertions = lib.nixvim.mkAssertions "plugins.lean" {
|
||||
assertion =
|
||||
!(
|
||||
# leanls lsp server is disabled in nvim-lspconfig
|
||||
config.plugins.lsp.servers.leanls.enable
|
||||
# lsp is not (!) disabled in the lean.nvim plugin
|
||||
&& !(
|
||||
# lsp is explicitly set to `false`.
|
||||
(isBool cfg.lsp.enable) && !cfg.lsp.enable
|
||||
)
|
||||
);
|
||||
message = ''
|
||||
You have not explicitly set `plugins.lean.lsp` to `false` while having `plugins.lsp.servers.leanls.enable` set to `true`.
|
||||
You need to either
|
||||
|
||||
- Remove the configuration in `plugins.lsp.servers.leanls` and move it to `plugins.lean.lsp`.
|
||||
- Explicitly disable the autoconfiguration of the lsp in the lean.nvim plugin by setting `plugins.lean.lsp` to `false`.
|
||||
- Remove the configuration in `plugins.lsp.servers.leanls` and move it to `plugins.lean.lsp`.
|
||||
- Explicitly disable the autoconfiguration of the lsp in the lean.nvim plugin by setting `plugins.lean.lsp` to `false`.
|
||||
|
||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#leanls
|
||||
'';
|
||||
}
|
||||
];
|
||||
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#leanls
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = [ cfg.leanPackage ];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue