mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
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:
parent
ae7c5f8869
commit
374fccae9e
2 changed files with 7 additions and 6 deletions
|
@ -23,7 +23,7 @@ let
|
|||
name = "dartls";
|
||||
description = "Enable dart language-server, for dart";
|
||||
package = pkgs.dart;
|
||||
extraOptions = {
|
||||
settingsOptions = {
|
||||
analysisExcludedFolders = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
|
@ -152,7 +152,7 @@ let
|
|||
name = "nil_ls";
|
||||
description = "Enable nil, for Nix";
|
||||
package = pkgs.nil;
|
||||
extraOptions = {
|
||||
settingsOptions = {
|
||||
formatting.command = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
|
@ -198,7 +198,7 @@ let
|
|||
description = "Enable rust-analyzer, for Rust.";
|
||||
serverName = "rust_analyzer";
|
||||
|
||||
extraOptions = import ./rust-analyzer-config.nix lib;
|
||||
settingsOptions = import ./rust-analyzer-config.nix lib;
|
||||
settings = cfg: { rust-analyzer = cfg; };
|
||||
}
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue