This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
ZSH Syntax Highlighting broken (envvars/expansion, string quoting issue) #133
Open
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Syntax highlighting breaks with some variable expansions and string quoting.
Steps to Reproduce
Take this sample of code:
prompt_p10k_setup () {
prompt_opts=( cr percent sp subst )
setopt noprompt{cr,percent,sp,subst} "prompt${^prompt_opts[@]}"
builtin autoload -Uz _p10k_tracked_autoload add-zsh-hook
_p10k_tracked_autoload p10k_render_prompt_from_spec prompt_p10k_render_to_vars
_p10k_tracked_autoload _p10k_define_hook _p10k_add_hook _p10k_run_hook
# association
typeset -gA p10k_opts _P10K_SEGMENT_DEFAULTS _P10K_ASYNC_STATII
# array
typeset -ga p10k_left p10k_right
}
Expected behavior: [What you expect to happen]
Syntax highlighting past ${^abc}
should continue normally.
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
Always.
Versions
Seems to have changed in Atom 1.32 or 1.33, didn't see a problem before that.
Additional Information
Repository with some sample code for testing the highlighting: https://github.com/robobenklein/p10k