mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-31 08:05:23 +02:00
plugins/lsp: Correctly mark servers as disabled if the lsp plugin is disabled
This commit is contained in:
parent
31eb9d8d75
commit
c674f10d18
1 changed files with 4 additions and 2 deletions
|
@ -30,6 +30,8 @@ with lib;
|
|||
let
|
||||
cfg = config.plugins.lsp.servers.${name};
|
||||
opt = options.plugins.lsp.servers.${name};
|
||||
|
||||
enabled = config.plugins.lsp.enable && cfg.enable;
|
||||
in
|
||||
{
|
||||
meta.nixvimInfo = {
|
||||
|
@ -131,7 +133,7 @@ in
|
|||
} // extraOptions;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = mkIf enabled {
|
||||
extraPackages = [ cfg.package ];
|
||||
|
||||
plugins.lsp.enabledServers = [
|
||||
|
@ -168,7 +170,7 @@ in
|
|||
(mkRemovedOptionModule (
|
||||
basePluginPath ++ [ "extraSettings" ]
|
||||
) "You can use `${basePluginPathString}.extraOptions.settings` instead.")
|
||||
(lib.mkIf cfg.enable (extraConfig cfg))
|
||||
(lib.mkIf enabled (extraConfig cfg))
|
||||
]
|
||||
# Add an alias (with warning) for the lspconfig server name, if different to `name`.
|
||||
# Note: users may use lspconfig's docs to guess the `plugins.lsp.servers.*` name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue