Skip to content

Enforce lazy evaluation of pkgs #3788

@MattSturgeon

Description

@MattSturgeon

At some point #2004 regressed, either in general or for LSPs specifically.

Option values should only be evaluated when they are used; i.e. when the feature using them is enabled. For package options, this means the package itself should only be evaluated when that package is being installed in the nixvim config.

E.g., #3780 and https://discourse.nixos.org/t/error-atopile-cannot-be-found-in-pkgs/70461 show that the atopile package options are being evaluated strictly, even when that specific LSP isn't enabled.

We should be able to enforce laziness by having a test that evaluates nixvim with pkgs = {}. Maybe we will also need variants of that test that enable portions of nixvim that shouldn't install any packages?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions