AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
247 stars 23 forks source link

environmentSelectedOnStart should be option in .httpyac.json #332

Open jhonnycano-forge opened 1 month ago

jhonnycano-forge commented 1 month ago

The httpyac vscode plugin allows to select an environment on start through a vscode setting (environmentSelectedOnStart). This would be a very good setting to be used in the settings files (.httpyac.json, httpyac.js, and so on).

Although a workaround exists for vscode (create a .vscode/settings.json file and set the setting httpyac.environmentSelectedOnStart). Some projects discourage adding this file to the git repository, so I think, it would be a good idea to have the option to set this value from the httpyac settings system.

alekdavis commented 1 month ago

@jhonnycano-forge I agree. But I think even better option would be to have the default marked in the environment file(s). It would be tricky if you use dotenv environment files (maybe have a convention with name with .default suffix or something like this), but should be simple for JSON/IntelliJ environment file. The point is that VSCode settings are generally not project specific, so they are better suited for things that do not change from project to project, but default environment is project-specific. But that wouldn't be on my high priority list, though.