-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compability with zsh-syntax-highlighting
plugin
#9
Comments
You can submit as many issue as you'd like 😁. I love interacting with issues and see how the plugin is being used. For this issue, this might've caused from me screwing around with |
That might be the point where it gets screwed. AFAIK its a very popular plugin (over 20k stars on GitHub, for example). Thus, compatibility might be an important thing for |
Were you sourcing zsh-syntax-highlighting before zsh-helix-mode? It's recommended here. I replicated the issue by sourcing zsh-syntax-highlighting before zsh-helix-mode. Syntax highlighting seems to work fine when sourced after zsh-helix-mode. After further testing,the cursor selection doesn't shows up instead... 😔 |
I was sourcing it manually through the command line. Therefore it was sourced after zsh-helix-mode, my bad. Ok, changing the order a little bit resolved it partly, but:
this... Here the command PS: Plus, at every char typed you can see the whole line getting (re)highlighted. Not a very bad thing, but just mentioning it. |
Ok, I just pushed another commit, there was some bug regarding the variable substitution. But highlighting still wouldn't work here. # source zsh-helix-mode
# source zsh-syntax-highlighting
function redraw-zhm-highlight {
__zhm_update_region_highlight
}
add-zle-hook-widget zle-line-pre-redraw redraw-zhm-highlight Not exactly ideal but this should make work. |
Ok, will try it. But in the long run zhm would need a solution which doesn't asks the users to make manual changes in their |
I can't think of a solution at the moment that doesn't require some kind of change. It's something regarding plugin ordering and that zsh-syntax-highlighting overpowers/removes all previous highlighting. zsh-syntax-highlighting requires to be sourced after all previous plugin so it will properly adds highlighting after every redraw. I haven't look at their docs in details just yet. Maybe there's some additional configuration here that we can use instead of using |
Seems like we can implement a custom highlighter, which still requires manual changes by the user. I'll look more into this. We probably could expose some functions that aids in making the custom highlighter. Or alternatively stays with the |
Sounds interesting. I, personally, manage anything manually through my But many people do. They run things with plugin manager or directly system packages without touching the Maybe you have to make kind of a design/availability decision:
PS: I also had a look how the package manager of my distro handles those zsh plugins which are available as system plugins. They're simply installed to |
I think that no system package managers were sourcing any plugins automatically on install. In all of the guide I've seen so far include commands/instructions to add source command to |
No, I meant ZSH is sourcing stuff from |
So far, the Helix mode works great. But I encountered a little flaw. (Sorry, for opening so much issues 😉 )
I use
zsh-syntax-highlighting
because it directly gives feedback if a typed command exists, highlights strings wrapped in quotes etc.Now, since using your most up-to-date version, the syntax highlighting stopped working, as you can see in the following screenshot. Upper line is before sourcing
zsh-helix-mode
, lower line the same command after sourcing, same for string highlighting:It has to do with one of your more recent changes, since syntax highlighting still worked last week when I tried Helix mode last time.
The text was updated successfully, but these errors were encountered: