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

No syntax highlighting #145

Closed
idr4n opened this issue May 10, 2023 · 8 comments
Closed

No syntax highlighting #145

idr4n opened this issue May 10, 2023 · 8 comments
Assignees

Comments

@idr4n
Copy link

idr4n commented May 10, 2023

Describe the bug

I just installed zap with the default initial plugins, including plug "zsh-users/zsh-syntax-highlighting", but I am not getting syntax highlighting.

Could there be a any reason for this in terms of my own config? It is the same in Wezterm, Kitty and Alacritty, and I have colors being displayed properly as well as icons.

Steps to reproduce

Clean install of zap with the default plugins (same as shown in the Youtube video where Zap is introduced)

Expected behavior

I should be getting syntax highlighting

Screenshots and recordings

No response

OS / Linux distribution

Arch Linux

Zsh version

5.9

Zap version

commit hash f565bda

Terminal emulator

Wezterm, Kitty, Alacritty

If using WSL on Windows, which version of WSL

None

Additional context

No response

@wintermi wintermi self-assigned this May 13, 2023
@wintermi
Copy link
Contributor

With the PR #147 the default .zshrc template has been modified to add the following two additional lines:

autoload -Uz compinit
compinit

Could I ask that you please retest the installation of ZAP.

In addition, once installed, please start a new zsh terminal window or execute the command zsh in the current terminal to verify the syntax highlighting is working or not.

@idr4n
Copy link
Author

idr4n commented May 13, 2023

@wintermi I updated zap (zap update) and added the two lines as suggested but still not getting syntax highlighting (in new terminal windows after the update). I also removed and reinstall the syntax highlighting package without luck.

@wintermi
Copy link
Contributor

Could you please execute the following command and paste the output into a comment:

typeset -p ZSH_VERSION ZSH_PATCHLEVEL ZSH_HIGHLIGHT_VERSION ZSH_HIGHLIGHT_REVISION

@wintermi
Copy link
Contributor

There are known issues with the zsh-syntax-highlighting plugin running on v5.9, mostly due to conflict with other plugins or configurations, such as vim mode. This could be present within a .zprofile, .zshenv or .zlogin file.

An alternative to the zsh-syntax-highlighting plugin you could try would be the fast-syntax-highlighting plugin. Simply replace the line that plug's the zsh-syntax-highlighting withing your .zshrc file with the following:

plug "zdharma-continuum/fast-syntax-highlighting"

@idr4n
Copy link
Author

idr4n commented May 14, 2023

Thanks a lot for investigating the issues. This is the output as requested:

typeset ZSH_VERSION=5.9
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset ZSH_HIGHLIGHT_VERSION=0.8.0-alpha2-dev
typeset ZSH_HIGHLIGHT_REVISION=HEAD

@idr4n
Copy link
Author

idr4n commented May 14, 2023

Actually, I just disabled the zsh-vi-mode.plugin which was not managed by zap but installed and sourced separately and syntax highlighting is working! So that plugin is the culprit. Thanks a lot. I will close this issue as it is not related to zap and will try the fast-syntax-highlighting plugin that you suggest.

@idr4n idr4n closed this as completed May 14, 2023
@idr4n
Copy link
Author

idr4n commented May 14, 2023

plug "zdharma-continuum/fast-syntax-highlighting" is working even with the vi mode plugin enabled. Thanks a lot for the suggestion @wintermi.

@wintermi
Copy link
Contributor

Excellent news. Glad I could help. 😊

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

2 participants