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

Incorrect highlighting #273

Open
fishBone000 opened this issue Sep 16, 2024 · 0 comments
Open

Incorrect highlighting #273

fishBone000 opened this issue Sep 16, 2024 · 0 comments

Comments

@fishBone000
Copy link

fishBone000 commented Sep 16, 2024

The parser seems to be parsing the following code incorrectly:
Screenshot_20240916_171059
This happens on fresh nvchad, astrovim and lazyvim installations.

I have tried to delete unrelated lines of code, so the following piece of code should reproduce the issue.

ZSH="${${(%):-%x}:a:h}"

# Set ZSH_CACHE_DIR to the path where cache files should be created
_omz_source() {
  /*) :${filepath:h:t}"
}

# Load all of the lib files in ~/oh-my-zsh/lib that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for lib_file ("$ZSH"/lib/*.zsh); do
  _omz_source "lib/${lib_file:t}"
done

Screenshot_20240916_171859

Some of the code is highlighted green, and some is white.

Deleting some of the characters brings the highlighting back to normal:

ZSH="${${(%):-%x}:a:h}"
     ^^^^

# Set ZSH_CACHE_DIR to the path where cache files should be created
_omz_source() {
            ^
  /*) :${filepath:h:t}"
    ^   *            !
}

# Load all of the lib files in ~/oh-my-zsh/lib that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for lib_file ("$ZSH"/lib/*.zsh); do
  _omz_source "lib/${lib_file:t}"
done

^: Deleting these will get the green highlight back to normal
*: Deleting these will get the white highlight back to normal
!: Deleting this one will make some of the code green

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

No branches or pull requests

1 participant