Skip to content

Add setting to control references code lens - #1900

Merged
Andy Jordan (andyleejordan) merged 2 commits into
PowerShell:mainfrom
SeeminglyScience:ref-lens-setting
Aug 31, 2022
Merged

Andy Jordan (andyleejordan) merged 2 commits into
PowerShell:mainfrom
SeeminglyScience:ref-lens-setting

Conversation

@SeeminglyScience

@SeeminglyScience Patrick Meinecke (SeeminglyScience) commented Aug 17, 2022 •

Copy link
Copy Markdown
Collaborator

PR Summary

This relies on PowerShell/vscode-powershell#4139

Adds a simple setting and update handler that adds/removes the references code lens.

PR Context

This gives folks the ability to disable the high perf impact code lens without disabling all other code lenses.

public CodeFoldingSettings CodeFolding { get; set; }
public PesterSettings Pester { get; set; }
public string Cwd { get; set; }
public bool EnableReferencesCodeLens { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LMAO this defaulted to false which caused the unit test CanSendReferencesCodeLensRequestAsync to fail. Should we just default to true for now?

Which, being the existing default behavior, fixes the tests.
@andyleejordan
Andy Jordan (andyleejordan) merged commit 62142ee into PowerShell:main Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeLens Issue-Enhancement A feature request (enhancement).

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants