Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Command for reloading current environment #23

Closed
jul1u5 opened this issue Feb 22, 2020 · 7 comments
Closed

[Feature]: Command for reloading current environment #23

jul1u5 opened this issue Feb 22, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@jul1u5
Copy link
Contributor

jul1u5 commented Feb 22, 2020

Is your feature request related to a problem? Please describe.
When I try to set up my nix environment for some project, I often need to reload the environment. The current workflow seems too cumbersome to me.

Right now, the fastest way to reload the environment is the following:

  1. Ctrl+Shift+P (Go to the command palette)
  2. Choose Nix-Env: Select environment
  3. Choose shell.nix (or some other file)

Note: the Select environment command always preselects Original user environment which isn't very useful. Perhaps we could put the current environment at the top of the environment list?

  1. Wait for the environment to prepare
  2. Click Reload

Describe the solution you'd like
I would like to have a command which reloads the current environment. I guess it would be enough to wrap the first three steps in this command. After the environment prepares, the user could then press the Reload button or use Developer: Reload Window command.

Additional context
It would also be great to have a keyboard shortcut for this command.

@jul1u5 jul1u5 added the enhancement New feature or request label Feb 22, 2020
@arrterian
Copy link
Owner

@jul1u5 I think It's a pretty useful feature. Sad, but I have a lack of time near time. If you can help with the contribution it will be awesome 🙂

@jul1u5
Copy link
Contributor Author

jul1u5 commented Feb 26, 2020

I would be happy to contribute :) Last time you mentioned that you are rewriting the codebase in PureScript, I see that the PS branch has not been merged yet. Should I just make changes to the TypeScript version?

@arrterian
Copy link
Owner

arrterian commented Feb 26, 2020

Yes, you can contribute to the typescript version as well 🙂
It will better to make the extension more user-friendly for now.

@arrterian arrterian assigned jul1u5 and unassigned arrterian Feb 27, 2020
@arrterian
Copy link
Owner

@jul1u5 thinking about this issue. Reload environment after selecting a new one when buttons "Reload" appears doing the same that build-it "Reload window" command. Sad but we aren't able to do environment changes without reloading window. Is this feature still useful for you?

@jul1u5
Copy link
Contributor Author

jul1u5 commented Apr 28, 2020

Yeah, I was thinking of implementing this feature, just didn't have much time recently.

I think this is useful as it provides a quicker shortcut for rebuilding the environment. Instead of running Select Environment command and then choosing your nix config, you would only need to run Rebuild Environment.

Perhaps the command should be better named Rebuild Environment as it should only rebuild and then the user would reload the window.

Also, not really related to this issue, but I was wondering if it would be feasible to watch nix config file for changes, rebuild the environment and then prompt the user to reload the window. But I guess that's very similar to what lorri does, so maybe we could integrate it somehow? What do you think?

@arrterian
Copy link
Owner

I got your approach and I like that way 👍

@arrterian
Copy link
Owner

@jul1u5 added command "Hit environment" in v1.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants