geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
920 stars 94 forks source link

Issue with syntax highlighter in a version controled directory #214

Closed vinhphamuit closed 6 years ago

vinhphamuit commented 6 years ago

Hello, I found some issues with syntax highlighter in a version controled directory with Geometry theme.

When you type something in a version controled directory with syntax highlighter is on, and then move the cursor back to the part where there is the command is highlighted, it would show something like this. image

This issue doesn't happen with the deafult theme nor in the normal directory. It's kinda annoying when you mistype something and want to fix but can't see anything. It would be very nice if it's fixed.

jedahan commented 6 years ago

Which syntax highlighter are you using? I am having trouble reproducing this issue on maxOS 10.14.3 in iTerm2 and Alacritty, using https://github.com/zsh-users/zsh-autosuggestions.

Can you share the most minimal zshrc that can reproduce this issue?

vinhphamuit commented 6 years ago

I'm using Prezto's syntax highlighting module (https://github.com/sorin-ionescu/prezto/tree/master/modules/syntax-highlighting) which using https://github.com/zsh-users/zsh-syntax-highlighting

This is my current zshrc image

jedahan commented 6 years ago

Can you try these two things?

  1. Update the prezto syntax-highlighting submodule to the latest version
  2. Try using https://github.com/zdharma/fast-syntax-highlighting ?

I want to try and find where the conflict is.

vinhphamuit commented 6 years ago
  1. Update prezto syntax-highlighting submodule to the latest version doen't help.
  2. Using fast-syntax-highlighting does help and doen't the same issue like above :)
jedahan commented 6 years ago

Are you happy using zdharma/fast-syntax-highlighting ? Maybe we can open an issue on zsh-users/zsh-synax-highlighting and see if we can fix things there? Maybe it relates to https://github.com/zsh-users/zsh-syntax-highlighting/pull/470 or https://github.com/zsh-users/zsh-syntax-highlighting/pull/160 ...

vinhphamuit commented 6 years ago

Maybe I will use fast-syntax-highlighting for a while.

frm commented 6 years ago

@jedahan any idea what this might be?

jedahan commented 6 years ago

@fribmendes when I looked around a while ago, it just seemed something underlying with zsh-syntax-highlighting being a bit buggy, and since fast-syntax-highlighting is nicer I just use that. I am trying to reduce my responsibilities a bit so since there is a working alternative I am happy to close this and recommend people use fast-syntax-highlighting. It's also a bit painful with people coming from frameworks that are harder to integrate with outside sources like ours. If someone who maintains omz or prezto includes geometry i'm happy to help work with them a bit, but this seems a hairy corner of ZLE that I have trouble debugging.

frm commented 6 years ago

I am happy to close this and recommend people use fast-syntax-highlighting

Yep, I'm perfectly fine with this. I can add it to the FAQ, in case this comes up.