vscode-hide-gitignored icon indicating copy to clipboard operation
vscode-hide-gitignored copied to clipboard

Hide doesn't work on workspaces

Open NicoCevallos opened this issue 6 years ago • 11 comments

Eve though the extension adds the files to hide in the workspace settings, it doesn't work.

Using VSCode without the workspaces, the extension works perfect.

NicoCevallos avatar Oct 15 '18 15:10 NicoCevallos

Yes, I'm also having this issue. The files seem to be greyed out but not hidden.

rpep avatar Oct 24 '18 06:10 rpep

Sorry guys, this still seems to be related to this: https://github.com/Microsoft/vscode/issues/28538

I'm using the proper APIs but they ignore folder settings for workspaces still.

You can open each of the workspace folders, run the command and then reopen your workspace. That will work, but is really inconvenient. :(

npx avatar Jan 22 '19 09:01 npx

does work for folders automatically either. works after ctrl+shift+p -> Hide Gitignored:....

vscode ver:1.42.1 ubuntu18.04

fudanglp avatar Feb 19 '20 12:02 fudanglp

I just republished the extension upgrading the APIs and hope that now the problem is resolved. Would anyone report back to me? :)

npx avatar Mar 21 '20 14:03 npx

I think this might be related to excluding the ".gitignore" file itself from the workspace. The extension was not working in my case for this reason.

On my vs-code settings.json:

// blah blah
"files.exclude": {
    "**/.gitignore": true,
}

I fixed this skipping the workspace-excluded files from the findFiles call:

out/gitignore-hider.js
61:      const files = yield vscode_1.workspace.findFiles("**/.gitignore", null);

nachovizzo avatar Mar 22 '20 15:03 nachovizzo

I just republished the extension upgrading the APIs and hope that now the problem is resolved. Would anyone report back to me? :)

Unfortunately it still just seems to be graying them out in VSCode 1.44.2

swrobel avatar May 06 '20 02:05 swrobel

Not sure if I did something wrong - but for me the files are still present and just grayed out... I'm on VSCode 1.45.0 MacOS

cwerner avatar May 11 '20 10:05 cwerner

I just republished the extension upgrading the APIs and hope that now the problem is resolved. Would anyone report back to me? :)

Unfortunately it still just seems to be graying them out in VSCode 1.44.2

This does work for me after applying the suggestion made by fudanglp.
vscode v1.46.1, windows 10

thanks for the extension

DoubleD-BrewCo avatar Jun 25 '20 15:06 DoubleD-BrewCo

It seems that for a workspace with multiple root folders, the root folder prefix that your plugin adds is not respected by Code but instead each line of files.exclude is considered relative to each root folder. An excerpt from my workspace config generated by your plugin:

	"folders": [
		…
		{
			"name": "picos",
			"path": "../picos"
		}
	],
	"settings": {
		"files.exclude": {
			…
			"picos/**/__pycache__/": true,
			…
		}
	}
}

Now picos/__pycache__ (where picos/ is the root folder) is still visible (though greyed out by Code) while the subfolders picos/picos/__pycache__ and picos/picos/expressions/__pycache__ are properly hidden.

In other words, the picos/ prefix is not treated as a root folder selector but is matched within each root folder. Unfortunately I did not find an alternative that works as desired. See also https://github.com/microsoft/vscode/issues/70438.

This is using Code OSS 1.47.0-1 on Arch Linux. The line "picos/**/__pycache__/": true, was produced from the line __pycache__/ in picos/.gitignore.

Viech avatar Jul 12 '20 13:07 Viech

Extension does not hide workspace file. Attached is screenshot after Hide Gitignored command run. https://gyazo.com/5bb6ce62382bc2ab341ec02a38ff319c

ursawd avatar Jul 26 '20 01:07 ursawd

Having the same issue.

sunilhari avatar Sep 22 '20 03:09 sunilhari