-
Notifications
You must be signed in to change notification settings - Fork 510
Codelens shows references to files/folders excluded using "files.exclude" setting #1039
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
Comments
I'd love this too. As we've been moving to a function-per-file source "built" into single-file PSM1 modules, those psm1 files sometimes end up within the folder that I've selected as the root of a project -- this means they show up in |
Agree, great suggestion. I also use a For me personally, exclusion though "search.exclude" which implicitly includes "files.exclude" in the filter would be preferred. I often refer back to the build folder within VSCode, so hiding it within the explorer by using "files.exclude" would be less optimal. |
If you use a local history extension, you will end up to 10.000+ found references very quickly. It would be sufficient, if VSCode ignores ALL hidden files and folders by default (or by settings), instead of using ignore lists, since most folders you wish to ignore (like .history .vs .vscore .git .svn...) are hidden by default. |
This is a reasonable request. However, I think rather than using
Ideally vscode could have a
|
And we'll make sure to talk to someone on the VS Code team before we walk down an implementation path. But in either case, this would roughly halve the number of files we're analyzing for modules who use a |
And maybe we do what this setting does:
inherits its default value from |
Hello, |
Hi @caparkaya, sorry we've been a bit busy lately. It looks like there is a desire for this, but it's currently not being worked on. There might still be the odd thing to discuss, like:
The other thing that still needs to happen is @joeyaiello's requirement:
@tylerl0706 @rkeithhill @SeeminglyScience any thoughts here? |
Oh, meant to add... @caparkaya we are always over the moon to accept contributions -- feel free to open a PR anytime! Contributions also get mentioned in the CHANGELOG. |
This is much needed. Indexing the .history folder is awful. I always end up with references to some history version of a file. Total nightmare. |
There should be a custom setting (or a codelens.exclude) so the extension can exclude things from parsing that we still want to have show up in the sidebar file list. However, like search.exclude that new setting must inherit The point is that you shouldn't spend time parsing files that aren't even visible to the user -- and the user shouldn't have to add additional exclusions if they've already hidden the files. |
@Jaykul Just to confirm, you're talking about ignoring files for the; (The reason I ask is the term CodeLens has a very specific meaning in the Language Server Protocol) |
For reference: I'll probably need to import https://www.nuget.org/packages/Microsoft.Extensions.FileSystemGlobbing into PSES to help with the globs that come from |
@glennsarti the package you referenced I did evaluate. I tried using it for the RecursivelyEnumerateFiles function in PSES and there was no way to handle any file access exceptions... It would just stop the whole glob operation. This was the really good one I found: |
Cross reference |
My PSES PR is making great headway into this. Won't be too long now. |
Closing as the fix has been merged and will be available in the next preview release |
System Details
$PSVersionTable
:Name Value
PSRemotingProtocolVersion 2.3
BuildVersion 10.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSVersion 5.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
Issue Description
I am experiencing a problem with codelens, in that the references it shows includes files and folders that are excluded using "files.exclude" in the settings file. Is this by design? Is there any way to exclude files and folders from the codelens references?
Attached Logs
I will be glad to attach logs if you think it will help, but I doubt logs will help with this issue.
The text was updated successfully, but these errors were encountered: