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

Settings: folderValue versus workspaceValue #29633

Closed
dbaeumer opened this issue Jun 27, 2017 · 10 comments
Closed

Settings: folderValue versus workspaceValue #29633

dbaeumer opened this issue Jun 27, 2017 · 10 comments
Assignees
Labels
api bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@dbaeumer
Copy link
Member

Tests #29466

  • write extension that reads configuration with the getConfiguration2 API.
  • have the setting be overridden on the workspace level

Observe: when using inspect the folderValue is not set. For the new API I would have expected that workspaceValue is undefined and folderValue is set.

@sandy081
Copy link
Member

@dbaeumer Can you please give an example of the setting and where it is defined?

@sandy081 sandy081 added workbench-multiroot Multi-root (multiple folders) issues settings-editor VS Code settings editor issues labels Jun 27, 2017
@sandy081 sandy081 added this to the June 2017 milestone Jun 27, 2017
@dbaeumer
Copy link
Member Author

It is defined the the .vscode/settings.json file

@sandy081
Copy link
Member

sandy081 commented Jun 27, 2017

And there is just one root folder in the workspace?

Edit: Ignore it. It does not matter

@dbaeumer
Copy link
Member Author

Yes, one root folder.

I tested editor.lineNumbers as well and with only one folder I am not able to get the folderValue populated.

@sandy081
Copy link
Member

Looks 🐛 to me

@sandy081 sandy081 added the bug Issue identified by VS Code Team member as probable bug label Jun 27, 2017
@dbaeumer
Copy link
Member Author

  • One workspace folder
  • editors.lineNumbers=off
    capture

@dbaeumer
Copy link
Member Author

Some comments after getting a a very good quick introducing on this from @sandy081

  • what confuses me is that in the past setting scopes mapped to file location. With the new story this is not true anymore. It depends on the type of the setting. For example editors.lineNumbers is always considered to be a folder setting
  • things get even more complicated when a single folder morphs into a workspace
  • May be we should always store workspace settings separate and have a workspace folder/file concept which we can open.

@dbaeumer
Copy link
Member Author

dbaeumer commented Jun 27, 2017

With two folders I have no value at all although I defined that value in both settings files in both folders.

capture

@dbaeumer
Copy link
Member Author

Latest build, single folder open and looking at editor.linenumbers.

capture

Shouldn't this now contain a folderValue. I am calling

	let config = vscode.workspace.getConfiguration2('editor');
	let inspect = config.inspect('lineNumbers');
	console.log(inspect);

@sandy081
Copy link
Member

folderValue is contained only when a resource is passed otherwise it is just workspaceValue even though (currently) workspace value comes first root folder (which is an implementation detail and will change).

@chrmarti chrmarti added the verified Verification succeeded label Jun 30, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

3 participants