-
-
Notifications
You must be signed in to change notification settings - Fork 110
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 request] Support mode for env variables. #68
Comments
Hey, thank you for kind words :) This sounds like a really good feature, can you please tell me how do you switch modes? In that way I'll have a cleaner idea about how to implement this! Regards |
Here is a basic idea for your reference.
With those APIs I could integrate them easily with telescope (mode picker and switcher), feline (status line). |
Thank you so much for such detailed explanation! Never saw something like this before, do you know if this format is valid in NodeJS dotenv package? I want to know if this already exists so I can take a look at some implementations haha, it seems that we will need to change how our |
Alright so I'm implementing this on my own way atm, do you have any idea about how should we identify what environment mode should be used? |
Perhaps you can draw some inspiration from https://www.jetbrains.com/help/idea/exploring-http-syntax.html#example-working-with-environment-files |
@NTBBloodbath Always use the first mode defined in env file as default is good enough for me. |
@NTBBloodbath what is the status of this feature? |
Nice work! This is the restclient I'm looking for a long time.
Here is a common case when I test restful api in day to day work.
Define a env named {{base_url}} in both
production
andlocal
modes. So I could switch tolocal
to test the code in local server, and switch toprod
after deployment.The {{base_url}} may looks like this.
In
production
mode, base_url ishttp://xyz.abc/api/v1.0/something
, and inlocal
mode base_url ishttp://localhost:8080
.If rest.nvim could support this, I could replace my rest client for good.
The text was updated successfully, but these errors were encountered: