mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-24 19:29:41 +01:00
modules/lsp: auto-import per-server custom modules
Adding a module in the following places will import the module into that specific server's submodule. This allows creating server-specific options. Added a test case to ensure all custom modules correspond to an actual server option to avoid accidental dead code.
This commit is contained in:
parent
cf6c8ef1fa
commit
2414e8e99f
3 changed files with 50 additions and 1 deletions
|
|
@ -90,5 +90,13 @@ in
|
|||
|
||||
imports = [
|
||||
./server-renames.nix
|
||||
];
|
||||
]
|
||||
# We cannot use `config._module.args.name` in imports, since `config` causes inf-rec.
|
||||
# Therefore we can only import custom modules when we have an externally supplied `name`.
|
||||
++ lib.optionals (args ? name) (
|
||||
lib.filter lib.pathExists [
|
||||
./custom/${args.name}.nix
|
||||
./custom/${args.name}/default.nix
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue