With the March 2023 release of VS Code the nix-env-selector extension seems to be activated too late, causing other extension that depend on the loaded nix environment to fail.
For example we install the haskell-language-server for the ghc version used in a project via nix, but the haskell language extension can't find it after instantiating the nix environment and reloading the window.
Solution
Adding an additional activationEvent "onLanguage" in the extension manifest seems to activate the extension earlier and solves the issue (at least for the haskell extension).
Problem
https://github.com/arrterian/nix-env-selector/issues/80
With the March 2023 release of VS Code the nix-env-selector extension seems to be activated too late, causing other extension that depend on the loaded nix environment to fail. For example we install the haskell-language-server for the ghc version used in a project via nix, but the haskell language extension can't find it after instantiating the nix environment and reloading the window.
Solution
Adding an additional activationEvent "onLanguage" in the extension manifest seems to activate the extension earlier and solves the issue (at least for the haskell extension).
This is the same approach that the direnv-vscode extension is using, see: https://github.com/direnv/direnv-vscode/pull/463