Closed lonix1 closed 1 year ago
I can implement such a Feature. My suggestion would be a settings with a path to this file. Or do you see the file per folder?
file per folder
Unsure what you mean - are you referring to a multi-root workspace?
My original thought was similar to the Code Spell Checker or Favorites Manager extensions (just as examples). In .vscode/settings.json
, they allow you to define settings directly, or to define a path to a separate file (e.g. .vscode/my-dictionary.json
).
But that is just one way to do it. Maybe you have a better idea?
There is a new setting which supports configuration of a external file.
I expect a array of commands in this file. Update to the file are immediatly updated in VSCode
Firstly, this is an awesome new feature, thanks so much for implementing it!
Secondly, it was very sad to learn that it's only available for "application settings" (~/.config/Code/User/settings.json
).
In some workspaces where you collaborate with others it's indeed more useful like that, but in others it's more useful to define it in the "workspace settings" (.vscode/settings.json
) directly.
I hope you'll reconsider to allow us to do either way - whichever is more suitable for a given project.
Thirdly, I couldn't get it to work. I did this:
~/.config/Code/User/settings.json
"statusbar_command.commandsFile": ".vscode/statusbar.json",
.vscode/statusbar.json
in the workspace[
{
"text": "$(gear)",
"tooltip": "workspace settings",
"id": "sbc_settings",
"name": "settings",
"priority": -1000,
"alignment": "right",
"command": "workbench.action.openWorkspaceSettings"
}
]
But that isn't shown. I restarted vscode for good measure.
I also tried "statusbar_command.commandsFile": "${workspaceFolder}/.vscode/statusbar.json"
.
vscode 1.80.2 extension 2.8.0
Thirdly, I couldn't get it to work.
The path must be absolute, because it is not workspace dependent. You should get an error listed in output of statusbar_commands
Secondly, it was very sad to learn that it's only available for "application settings"
I may not understand the use case yet. It is always possible to have one .vscode/settings.json per workspace, which is then also committed. If you commit now only the special statusbarcommands.json it would not work without the extra entry in the workspace settings. For me the workspace settings are always more or less empty, what sense does it make to build such a construct here?
I defined items in my
.vscode/settings.json
and it works well.But is it possible to define the config in a separate file? e.g.
.vscode/statusbar.json
? That is convenient because it would be decoupled from the vscode config (which we have in source control).