mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 04:35:08 +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
|
@ -21,13 +21,16 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings = lib.optional (cfg.installGhc == null) ''
|
||||
`hls` relies on `ghc` (the Glasgow Haskell Compiler).
|
||||
- Set `plugins.lsp.servers.hls.installGhc = true` to install it automatically with Nixvim.
|
||||
You can customize which package to install by changing `plugins.lsp.servers.hls.ghcPackage`.
|
||||
- Set `plugins.lsp.servers.hls.installGhc = false` to not have it install through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
'';
|
||||
warnings = lib.nixvim.mkWarnings "plugins.lsp.servers.hls" {
|
||||
when = cfg.installGhc == null;
|
||||
message = ''
|
||||
`hls` relies on `ghc` (the Glasgow Haskell Compiler).
|
||||
- Set `plugins.lsp.servers.hls.installGhc = true` to install it automatically with Nixvim.
|
||||
You can customize which package to install by changing `plugins.lsp.servers.hls.ghcPackage`.
|
||||
- Set `plugins.lsp.servers.hls.installGhc = false` to not have it install through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
'';
|
||||
};
|
||||
|
||||
extraPackages = lib.optional ((lib.isBool cfg.installGhc) && cfg.installGhc) cfg.ghcPackage;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue