microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
185 stars 55 forks source link

Default configuration #418

Open KrestenHelstrup opened 1 year ago

KrestenHelstrup commented 1 year ago

Hi,

Everytime I open up my workspace I have to set the build configuration even though only one configuration is present in my settings.json file. Would it be possible to mark a configuration as default which would automatically be selected ?

Thanks in advance

andreeis commented 1 year ago

@KrestenHelstrup, are you selecting the configuration via the UI on the left, after clicking the "C/C++" icon? Normally once selected, it doesn't go away unless you run the command "Makefile: Reset the Makefile Tools Extension workspace state (for troubleshooting)". What OS are you on? How is your configuration set in settings?

KrestenHelstrup commented 1 year ago

Hi, I'm sorry my description was a bit unclear. Once I have selected the config it stays, but when I pull a new repo I have to select the config even though only one config exists. Due to the nature of SVN I also have to reselect it when I create a new branch. I don't know what the feature is used for in complex project, but I guess that for most embedded projects it always looks something like this: "makefile.configurations": [ { "name": "defaultConfig", "makeArgs": ["-j12"], "problemMatchers": ["$gcc"], } ], Maybe another solution could be to automatically select it if there is only one config available ?

andreeis commented 1 year ago

@KrestenHelstrup, I was thinking of the default to be a configuration that did not require any setting: no make args, no problem matchers... nothing. And the slightest difference that would require a definition would make the configuration non default. But I realize we can look at the default concept from another angle like you describe. It sounds good to always select the only entry defined in makefile.configurations[]. We'll brainstorm and decide whether to implement this suggestion or not (which would be a quick short code change anyway).

KrestenHelstrup commented 1 year ago

@andreeis Thanks for considering this option.

shivampotdar commented 1 month ago

+1 for this. I would like to check in settings.json to our repository and have a particular configuration always selected by default for seamless experience.

Yingzi1234 commented 1 month ago

@shivampotdar We are glad that you provided a vote for this issue, we have received your suggestion and we will continue to wait for the vote to decide whether to implement this suggestion or not!