Commit ac610efd authored by teto's avatar teto
Browse files

neovimUtils: improve error message

Before:

    error: The option `plugins."[definition 1-entry 1]".toto' does not exist. Definition values:
       - In `<unknown-file>': "tata"

After:
    error: The option `plugins."[definition 1-entry 1]".toto' does not exist. Definition values:
    - In `pkgs/applications/editors/neovim/plugin-submodule.nix': "tata"

I've renamed "module.nix" to "plugin-submodule.nix" in case we want to
add a similar module for the top-level wrapper.
parent e3e9c86e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ let
      neovimConfig =
        structuredConfigure:
        let
          module = import ./module.nix;
          module = import ./plugin-submodule.nix;
          # Generate init.vim configuration
          cfg = (
            lib.evalModules {
@@ -97,6 +97,7 @@ let

      checked_cfg = neovimConfig {
        inherit plugins;
        _file = "pkgs/applications/editors/neovim/plugin-submodule.nix";
      };

      pluginsNormalized = checked_cfg.plugins;