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

Suggesting; make "files.exclude" to have ${workspaceFolder:<foldername>} prefix for multi-root workspace #48262

Closed
lostfields opened this issue Apr 20, 2018 · 13 comments
Assignees
Labels
*out-of-scope Posted issue is not in scope of VS Code

Comments

@lostfields
Copy link

  • VSCode Version: 1.22

I would love to have more flexibility in "files.exlude" for multi-root workspace. I've tried relative paths but that doesn't work since "files.exclude" is applied to each folder. If I'm hiding folder "build" I don't want to hide it from all folders.

I know I can have .vscode/settings.json but I don't want to check these files into my source control

"folders": [
		{
			"name": "root",
			"path": "."
		},
		{
			"name": "website",
			"path": "./app"
		},
		{
			"name": "api",
			"path": "./src"
		}
	],
	"settings": {
		"files.exclude": {
			"**/.git": true,
			"**/.vscode": true,
			"${workspaceFolder:root}/build": true
		}
	}
}

Hides build in folder root but still showing it in folder website

@roblourens
Copy link
Member

I wonder whether we want to be able to set settings in general for a particular folder in a workspace file, without adding it to that folders' settings.json. @sandy081? Of course that would just make settings editing more complicated.

Otherwise I'm not opposed to this.

@sandy081
Copy link
Member

I do not think it is related to folder/workspace settings. In this scenario, it is up to the setting files.exclude to decide if they want to support variables or not. This is pretty similar to how MR workspace debug configurations support root variables. So, I would leave this to owner of that particular setting.

@bpasero @isidorn FYI

@isidorn
Copy link
Contributor

isidorn commented Apr 23, 2018

Sounds simlar to an open feature request that settings should support variables resolving.

@sandy081
Copy link
Member

Not exactly, because how does the configuration knows what to resolve. In this case it is a key that has to be resolved.

@roblourens
Copy link
Member

@sandy081 What I'm getting at is, we could solve it without variables by having a way to set files.exclude in a normal way, just scoped to one folder. That would work in general for all settings. I don't know whether that's been discussed before. But I'm lukewarm on adding a 4th settings scope.

@lostfields
Copy link
Author

I'm not aware of everything or how thing should work, but I'll try to throw something in.

What if all paths in files.exclude can be both relative and absolute? Absolute paths were applied to all folders (/build), and relative paths were applied to folders that matches the relative location of workspace file (./build)?

I was thinking this since folders[].path can be both relative and absolute when referering workspace folders

@sandy081
Copy link
Member

@roblourens

we could solve it without variables by having a way to set files.exclude in a normal way, just scoped to one folder

Do you mean folder settings in MR workspace or support settings in every folder?

IMO this makes sense supporting by files.exclude setting as it is very specific to it.

@roblourens
Copy link
Member

Do you mean folder settings in MR workspace

Yeah, specifying folder settings in the workspace file.

IMO this makes sense supporting by files.exclude setting as it is very specific to it.

Maybe - this one case just involves files.exclude but I can imagine someone having the same request for other settings. If this ability is useful, I don't know why it would only be useful for files.exclude and no other setting.

@lostfields
Copy link
Author

One thing I may want to mention, I have problems with https://marketplace.visualstudio.com/items?itemName=maty.vscode-mocha-sidebar when defining the path (mocha.files.glob) of test-files in a workspace. The path is relative to the first folder in "folders" so I can't rearrange the folders in the workspace-file.

@roblourens roblourens added the *out-of-scope Posted issue is not in scope of VS Code label Sep 13, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 13, 2018

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@dfoverdx
Copy link

This is essentially a duplicate of #82145. The documentation hints that the desired effect is possible, but does not clearly explain it. This is the intended solution: link.

@cloph
Copy link

cloph commented Apr 29, 2021

requiring a separate settings.json in one of the folders is a workaround at best, but not a real solution.

@dfoverdx
Copy link

requiring a separate settings.json in one of the folders is a workaround at best, but not a real solution.

I don't disagree, but I do believe it's the dev team's intended solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

6 participants