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

Semantic highlighting doesn't apply to text that is typed #5082

Open
6 tasks done
MartinGC94 opened this issue Nov 3, 2024 · 1 comment
Open
6 tasks done

Semantic highlighting doesn't apply to text that is typed #5082

MartinGC94 opened this issue Nov 3, 2024 · 1 comment

Comments

@MartinGC94
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

Like the title says, semantic highlighting doesn't work for any new text you type, it only works for the text that was already there when you opened a file. Interestingly the VS code token inspect feature correctly lists the semantic color but the visuals aren't updated. Initially I assumed this was a bug in VS code itself but if I try it with the C# extension it works perfectly fine in VS code so they must be doing something different from this extension.
Here's a clip that demonstrates the issue:

Highlight.Bug.mp4

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.5.0-preview.5
PSEdition                      Core
GitCommitId                    7.5.0-preview.5
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2024.5.0
InstanceId       : 0de14edd-e7a3-4dcc-9ad1-f833dc86ffca
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : da-DK
CurrentUICulture : da-DK
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.96.0-insider
19fabc20e35c89915c772116503a079554166a3f
x64

Extension Version

Steps to Reproduce

Enable semantic highlighting with colors that don't match the colors from the textmate highlighting and start typing.

Visuals

No response

Logs

No response

@MartinGC94 MartinGC94 added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Nov 3, 2024
@JustinGrote JustinGrote added Area-Semantic Highlighting and removed Needs: Triage Maintainer attention needed! labels Nov 4, 2024
@JustinGrote
Copy link
Collaborator

Thanks for the submission Martin! Keep them coming, I plan to look more into it once I finish up the logging PR, it will help to give much better visibility into what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants