1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

modules/lsp: rename server settingsconfig

See RFC: https://github.com/nix-community/nixvim/issues/3745

This effectively reverts 21688b1d2a
This commit is contained in:
Matt Sturgeon 2025-10-03 20:07:13 +01:00
parent 57006a3ace
commit 9f336d2d71
8 changed files with 30 additions and 29 deletions

View file

@ -196,7 +196,7 @@ in
lsp.servers.${serverName} = _: {
# Top-secret internal option that only exists when the server is enabled via the old API.
# The new API checks if this attr exists and uses it to wrap the server's settings string.
options.__settingsWrapper = lib.mkOption {
options.__configWrapper = lib.mkOption {
type = lib.types.functionTo lib.types.str;
description = ''
This internal option exists to preserve the old `plugins.lsp` behaviour.
@ -217,9 +217,9 @@ in
lib.modules.mkAliasAndWrapDefsWithPriority lib.id opts.package
);
packageFallback = lib.modules.mkAliasAndWrapDefsWithPriority lib.id opts.packageFallback;
__settingsWrapper =
settings: "__wrapSettings(${lib.foldr lib.id settings config.plugins.lsp.setupWrappers})";
settings = {
__configWrapper =
luaCfg: "__wrapConfig(${lib.foldr lib.id luaCfg config.plugins.lsp.setupWrappers})";
config = {
autostart = lib.mkIf (cfg.autostart != null) cfg.autostart;
cmd = lib.mkIf (cfg.cmd != null) cfg.cmd;
filetypes = lib.mkIf (cfg.filetypes != null) cfg.filetypes;