jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
50 stars 4 forks source link

Variable name highlighting wrong within curly braces #57

Closed bland328 closed 3 months ago

bland328 commented 1 year ago

The code with a problem is:

VAR1="$VAR2"    # correct
VAR1="${VAR2}"  # incorrect

It looks like:

Screenshot 2023-03-21 at 10 45 03 AM

It should look like:

${VAR2} should be highlighted like $VAR.

jeff-hykin commented 1 year ago

This is what it looks like for me. Are you on the latest version?

Screen Shot 2023-03-21 at 1 59 03 PM
bland328 commented 1 year ago

The latest version did fix this (and so many other issues that I was preparing to downgrade VS Code), so thanks very much!

I wasn't using the latest version because I didn't understand that there was such a thing, and here's why:

I first reported a highlighting issue at https://github.com/microsoft/vscode/issues/177621, and it was moved here with the explanation that "We switched to a better maintained shell script syntax highlighting grammar recently and we're still working out the bugs."

So, I came here and started reporting other bugs without understanding that better-shell-syntax is not just built into VS Code, but is also an installable extension that might be superior to what's built-in.

Assuming I really do understand the situation correctly, perhaps a prominent "if you are here to report issues, make sure you've manually installed the extension" message at the top of both README.md and the Bug Report template would save both you and naive users like me some pain :)