Skip to content

Incorrect highlighting #273

Open
Open
@fishBone000

Description

@fishBone000

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions