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

Left shift is being recognized as heredoc #93

Open
alexr00 opened this issue Jun 19, 2024 · 5 comments
Open

Left shift is being recognized as heredoc #93

alexr00 opened this issue Jun 19, 2024 · 5 comments

Comments

@alexr00
Copy link

alexr00 commented Jun 19, 2024

The code with a problem is:

#! /bin/bash

i=$(( 1 + 2))
i=$(( 1 << 2 ))
i=$((1 << 2))
i=$(( 1 + 2 ))
i=$((i<<2))

It looks like:

image

The scopes:

keyword.operator.heredoc.shell
meta.argument.shell
meta.statement.command.shell
meta.statement.shell
meta.parenthese.group.shell
meta.scope.subshell
meta.expression.assignment.shell
source.shell

It should look like:

After the unexpected heredoc scope, the following lines end up with a heredoc scope, when instead they should be colored similarly to line 3.

Originally from @skyp0714 in microsoft/vscode#215908

@sonic2kk
Copy link

Facing this exact issue as well. Seems other editors have the exact same issue. When searching, I found numerous reports of this for Vim, and I am also experiencing this with the Kate editor.

Is there a workaround in the meantime? Is there a comment I can put somewhere to temporarily correct the highlighting? I maintain a large Bash script and this is going to cause broken highlighting for a few thousand lines 😅

@skyp0714
Copy link

skyp0714 commented Jul 14, 2024 via email

@jeff-hykin
Copy link
Owner

should be fixed on v1.10.0!

@alexr00
Copy link
Author

alexr00 commented Sep 2, 2024

@jeff-hykin is this one that you plan to port to master?

@jeff-hykin
Copy link
Owner

@jeff-hykin is this one that you plan to port to master?

Yes, thanks for reminding me

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

4 participants