Modifying editor environment via an extension

I use Nix for managing my development environments, and I’d like to make a Nova extension that allows me to use tools from my project local Nix environments. This means I need to modify things like environment variables (PATH being the major one). Is it possible to do this from an editor context so the editor can use the language server provided by Nix?

Hello Bram,

When creating a Language Server extension, you will be able to set up custom environment variables for the language server executable through the constructor of the LanguageClient instance (see LanguageClient - Nova).


Thanks! But I’m not making a language server extension, I want to make an extension that allows me to load the Nix environment so I can use the language servers supplied by Nix with other extensions. Something similar to “Nix Environment Selector” for Visual Studio Code.

(sorry about the above post, I’m not sure how to use this forum software)

@bitmapper Hey Bram, I’m the maintainer of the Nova Nix extension. I’ve looked into this a few times and never found a way (to my liking) of doing this. That’s not to say it can’t be done, I honestly didn’t try too hard. I hacked around with adding an alias to my zshrc that would open my Nova editor to the current project in a Nix shell. I don’t remember it working that great though so I still rely heavily on Vim and Emacs.