nvim-lsp: Put the settings options in the settings namespace (#137)

This is done to avoid mixing setting options and LSP setup options.
This commit is contained in:
traxys 2023-01-23 14:52:46 +01:00 committed by GitHub
parent ae7c5f8869
commit 374fccae9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -9,7 +9,7 @@
, extraPackages ? { }
, cmd ? (cfg: null)
, settings ? (cfg: { })
, extraOptions ? { }
, settingsOptions ? { }
, ...
}:
# returns a module
@ -30,7 +30,8 @@
options = {
plugins.lsp.servers.${name} = {
enable = mkEnableOption description;
} // packageOption // extraOptions;
settings = settingsOptions;
} // packageOption;
};
config = mkIf cfg.enable
@ -42,7 +43,7 @@
name = serverName;
extraOptions = {
cmd = cmd cfg;
settings = settings cfg;
settings = settings cfg.settings;
};
}];
};