mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/lsp: add packageFallback option
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Build unstable (push) Waiting to run
Documentation / Build 24.11 (push) Waiting to run
Documentation / Build 25.05 (push) Waiting to run
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Build unstable (push) Waiting to run
Documentation / Build 24.11 (push) Waiting to run
Documentation / Build 25.05 (push) Waiting to run
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
https://github.com/nix-community/nixvim/pull/3445#pullrequestreview-2908615597
This commit is contained in:
parent
ee715541ab
commit
6a054de04d
4 changed files with 77 additions and 6 deletions
|
@ -55,6 +55,16 @@ in
|
|||
lib.nixvim.mkMaybeUnpackagedOption "plugins.lsp.servers.${name}.package" pkgs name
|
||||
package;
|
||||
|
||||
packageFallback = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
When enabled, the language server package will be added to the end of the `PATH` _(suffix)_ instead of the beginning _(prefix)_.
|
||||
|
||||
This can be useful if you want local versions of the language server (e.g. from a devshell) to override the nixvim version.
|
||||
'';
|
||||
};
|
||||
|
||||
cmd = mkOption {
|
||||
type = with types; nullOr (listOf str);
|
||||
default =
|
||||
|
@ -148,7 +158,8 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf enabled {
|
||||
extraPackages = [ cfg.package ];
|
||||
extraPackages = lib.optional (!cfg.packageFallback) cfg.package;
|
||||
extraPackagesAfter = lib.optional cfg.packageFallback cfg.package;
|
||||
|
||||
plugins.lsp.enabledServers = [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue