mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-01 00:24:59 +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
|
let
|
||||||
cfg = config.plugins.lsp.servers.${name};
|
cfg = config.plugins.lsp.servers.${name};
|
||||||
opt = options.plugins.lsp.servers.${name};
|
opt = options.plugins.lsp.servers.${name};
|
||||||
|
|
||||||
|
enabled = config.plugins.lsp.enable && cfg.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
meta.nixvimInfo = {
|
meta.nixvimInfo = {
|
||||||
|
@ -131,7 +133,7 @@ in
|
||||||
} // extraOptions;
|
} // extraOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf enabled {
|
||||||
extraPackages = [ cfg.package ];
|
extraPackages = [ cfg.package ];
|
||||||
|
|
||||||
plugins.lsp.enabledServers = [
|
plugins.lsp.enabledServers = [
|
||||||
|
@ -168,7 +170,7 @@ in
|
||||||
(mkRemovedOptionModule (
|
(mkRemovedOptionModule (
|
||||||
basePluginPath ++ [ "extraSettings" ]
|
basePluginPath ++ [ "extraSettings" ]
|
||||||
) "You can use `${basePluginPathString}.extraOptions.settings` instead.")
|
) "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`.
|
# 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
|
# 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