question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Codelens shows references to files/folders excluded using "files.exclude" setting

See original GitHub issue

System Details

  • Operating system name and version: Windows Server 2012 R2
  • VS Code version: 1.16.1
  • PowerShell extension version: 1.4.3
  • Output from $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

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

code -v
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ code -v
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      4      1      0


PS> code --list-extensions --show-versions
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ code --list-extensions --show-versions
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Jaykulcommented, Oct 6, 2017

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 go to definition and interfere with finding the file I needed to edit…

1reaction
glennsarticommented, Mar 16, 2019

My PSES PR is making great headway into this. Won’t be too long now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User and Workspace Settings - Visual Studio Code
A setting shows up under this filter if its value differs from the default value, or if its value is explicitly set in...
Read more >
VS Code tips — Hiding files in the explorer using the Files
Today's VS Code setting : files. exclude Use ' files. exclude ' to hide files or folders VS Code's explorer. By default, hidden...
Read more >
visual studio 2019 - Disable CodeLens in specific files
In your project file, you can set the InProject metadata on the files to false to prevent them from showing up in Solution...
Read more >
VS code-4 用户和工作区设置
"files.eol": "auto", // Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show...
Read more >
VSCODE 中 ESlint全部默认设置 - 秦时明月NightTiger
Editor // Controls whether the editor shows CodeLens. ... Configure glob patterns for excluding files and folders in fulltext searches and quick open....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found