Is your feature request related to a problem? Please describe.
Right now, it seems like there is no static analysis inside callback functions being used for overriding certain packages/attributes in a derivation or derivation set. For example, if we want to override some of the pkgs.vimPlugins, then it seems like the fixed-point function we pass to pkgs.vimPlugins.extend does not get statically analyzed to recognize the oldAttrs and finalAttrs as "the same shape" as pkgs.vimPlugins.
Describe the solution you'd like
Would it be possible for the language server to do a bit more inference for these fixpoint functions?
Maybe a different way to get around things: I did some snooping in the codebase, and my understanding is that pkgs and lib are hard-coded constants, where variables with those names are assumed to follow the format of the nixpkgs field in settings.nixd.nixpkgs.expr. Could it be possible to have more user-defined mappings, so I could define e.g. oldVimAttrs to point to (import <nixpkgs> { }).vimPlugins or something like that?
Describe alternatives you've considered
I tried looking around the existing issues but did not find anything that seemed super-related to this ask.
Additional context
Thanks a bunch for your work on this project! I also understand that since Nix is dynamically-typed, a lot of these static analyses may not be possible---feel free to close this issue if that ends up being the case.
Is your feature request related to a problem? Please describe.
Right now, it seems like there is no static analysis inside callback functions being used for overriding certain packages/attributes in a derivation or derivation set. For example, if we want to override some of the
pkgs.vimPlugins, then it seems like the fixed-point function we pass topkgs.vimPlugins.extenddoes not get statically analyzed to recognize theoldAttrsandfinalAttrsas "the same shape" aspkgs.vimPlugins.Describe the solution you'd like
Would it be possible for the language server to do a bit more inference for these fixpoint functions?
Maybe a different way to get around things: I did some snooping in the codebase, and my understanding is that
pkgsandlibare hard-coded constants, where variables with those names are assumed to follow the format of thenixpkgsfield insettings.nixd.nixpkgs.expr. Could it be possible to have more user-defined mappings, so I could define e.g.oldVimAttrsto point to(import <nixpkgs> { }).vimPluginsor something like that?Describe alternatives you've considered
I tried looking around the existing issues but did not find anything that seemed super-related to this ask.
Additional context
Thanks a bunch for your work on this project! I also understand that since Nix is dynamically-typed, a lot of these static analyses may not be possible---feel free to close this issue if that ends up being the case.