zsh-users
 help / color / mirror / code / Atom feed
* Colorful new fast-syntax-highlighting
@ 2018-05-23 16:48 Sebastian Gniazdowski
  2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
  2018-05-27 14:46 ` Sebastian Gniazdowski
  0 siblings, 2 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-05-23 16:48 UTC (permalink / raw)
  To: Zsh Users

Hello
Decided to write because it will be all colorful images:

a) colorizing of assignments:

http://psprint.blinkenshell.org/assign.png

b) colorizing of typeset/export/etc. assignments (different state-path
in parser):

http://psprint.blinkenshell.org/typeset.png

c) special math-mode for zcalc

http://psprint.blinkenshell.org/fsyh-zcalc.png

d) the detection of blank variables above in zcalc – also in advanced way:

https://asciinema.org/a/3iHdW7gYYrJOyhiHPHLTXnzKc

All in fast-syntax-highlighting,
https://github.com/zdharma/fast-syntax-highlighting

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-23 16:48 Colorful new fast-syntax-highlighting Sebastian Gniazdowski
@ 2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
  2018-05-25 12:07   ` Daniel Shahaf
  2018-06-10 21:28   ` Sebastian Gniazdowski
  2018-05-27 14:46 ` Sebastian Gniazdowski
  1 sibling, 2 replies; 12+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-05-23 19:00 UTC (permalink / raw)
  To: zsh-users

It will be nice to (as already suggested in both issue trackers) to merge that 
into "original" zsh-syntax-hl.

Also, how about freezing on path coloring in "big" direcotires (with millions 
of files)?
And how about "dead" mounts (that also leads zsh to go into D-state)?




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
@ 2018-05-25 12:07   ` Daniel Shahaf
  2018-05-25 12:19     ` Vadim A. Misbakh-Soloviov
  2018-06-10 21:28   ` Sebastian Gniazdowski
  1 sibling, 1 reply; 12+ messages in thread
From: Daniel Shahaf @ 2018-05-25 12:07 UTC (permalink / raw)
  To: Vadim A. Misbakh-Soloviov, zsh-users

Vadim A. Misbakh-Soloviov wrote on Wed, 23 May 2018 22:00 +0300:
> It will be nice to (as already suggested in both issue trackers) to merge that 
> into "original" zsh-syntax-hl.
> 

I would love to work with Sebastian to merge the two efforts. z-sy-h has
an open ticket for that:
https://github.com/zsh-users/zsh-syntax-highlighting/issues/434

In the meantime, Matthew, Julien, maybe we should link fast-syntax-highlighting
from INSTALL.md or something?  I'm not afraid of competition ☺

> Also, how about freezing on path coloring in "big" direcotires (with millions 
> of files)?

There's X_ZSH_HIGHLIGHT_DIRS_BLACKLIST in master.  It hasn't been released yet.
Note that the X_ prefix means it's experimental (= enjoys limited forward
compat guarantees).  If you give it a spin do let us know how it goes.

Please continue the discussion on the (relevant) github issue tracker; this
list isn't a support forum for third-party modules.

> And how about "dead" mounts (that also leads zsh to go into D-state)?

Sounds like an OS-level problem of stat(2)/readdir(3) not returning.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-25 12:07   ` Daniel Shahaf
@ 2018-05-25 12:19     ` Vadim A. Misbakh-Soloviov
  2018-05-25 12:35       ` Daniel Shahaf
  2018-05-25 15:23       ` Sebastian Gniazdowski
  0 siblings, 2 replies; 12+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-05-25 12:19 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

В письме от пятница, 25 мая 2018 г. 15:07:30 MSK пользователь Daniel Shahaf 
написал:
> There's X_ZSH_HIGHLIGHT_DIRS_BLACKLIST in master.
Well, I know about such a "feature" in z-sy-h. But I failed to found something 
similar in fast-hl, so that question was mainly about if fast-hl have that 
issue (which is almost fixed in z-sy-h), or doesn't affected.

The case of that question was in that fact, that (as far as I understand) 
plugins are mutually exclusive, so testing that manually (instead of asking 
here) will require some additional work (remove z-sy-h from dotfiles, add 
fast-hl, reconfigure, deploy dotfiles to all the servers, check, then all the 
same in reverse order) :-/

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-25 12:19     ` Vadim A. Misbakh-Soloviov
@ 2018-05-25 12:35       ` Daniel Shahaf
  2018-05-25 15:23       ` Sebastian Gniazdowski
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Shahaf @ 2018-05-25 12:35 UTC (permalink / raw)
  To: zsh-users

Vadim A. Misbakh-Soloviov wrote on Fri, 25 May 2018 15:19 +0300:
> The case of that question was in that fact, that (as far as I understand) 
> plugins are mutually exclusive, so testing that manually (instead of asking 
> here) will require some additional work (remove z-sy-h from dotfiles, add 
> fast-hl, reconfigure, deploy dotfiles to all the servers, check, then all the 
> same in reverse order) :-/

You could just run 'zsh -f' and then source fast-syntax-highlighting.plugin.zsh.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-25 12:19     ` Vadim A. Misbakh-Soloviov
  2018-05-25 12:35       ` Daniel Shahaf
@ 2018-05-25 15:23       ` Sebastian Gniazdowski
  1 sibling, 0 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-05-25 15:23 UTC (permalink / raw)
  To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users

On 25 May 2018 at 14:19, Vadim A. Misbakh-Soloviov <mva@mva.name> wrote:
> В письме от пятница, 25 мая 2018 г. 15:07:30 MSK пользователь Daniel Shahaf
> написал:
>> There's X_ZSH_HIGHLIGHT_DIRS_BLACKLIST in master.
> Well, I know about such a "feature" in z-sy-h. But I failed to found something
> similar in fast-hl, so that question was mainly about if fast-hl have that
> issue (which is almost fixed in z-sy-h), or doesn't affected.

I added it now:

typeset -gA FAST_BLIST_PATTERNS
FAST_BLIST_PATTERNS[/mount/nfs1/*]=1
FAST_BLIST_PATTERNS[/mount/disk2/*]=1

It uses the interesting (K) subscript flag of associative arrays.

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-23 16:48 Colorful new fast-syntax-highlighting Sebastian Gniazdowski
  2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
@ 2018-05-27 14:46 ` Sebastian Gniazdowski
  2018-05-27 15:54   ` Vadim A. Misbakh-Soloviov
  1 sibling, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-05-27 14:46 UTC (permalink / raw)
  To: Zsh Users

FSH now supports 256-color themes. I must say that the difference from
the default rigid 8-color palette is quite drastic. Asciinema
recording presenting six shipped themes:
https://asciinema.org/a/183814

-- 
Best regards,
Sebastian Gniazdowski


On 23 May 2018 at 18:48, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Hello
> Decided to write because it will be all colorful images:
>
> a) colorizing of assignments:
>
> http://psprint.blinkenshell.org/assign.png
>
> b) colorizing of typeset/export/etc. assignments (different state-path
> in parser):
>
> http://psprint.blinkenshell.org/typeset.png
>
> c) special math-mode for zcalc
>
> http://psprint.blinkenshell.org/fsyh-zcalc.png
>
> d) the detection of blank variables above in zcalc – also in advanced way:
>
> https://asciinema.org/a/3iHdW7gYYrJOyhiHPHLTXnzKc
>
> All in fast-syntax-highlighting,
> https://github.com/zdharma/fast-syntax-highlighting
>
> --
> Best regards,
> Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-27 14:46 ` Sebastian Gniazdowski
@ 2018-05-27 15:54   ` Vadim A. Misbakh-Soloviov
  2018-05-28 10:03     ` Sebastian Gniazdowski
  0 siblings, 1 reply; 12+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-05-27 15:54 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]

Can you make it also support truecolor (24bit) colors as well, please?


As far as I see from themes (ini-files) there is support for "named" colors 
and 0-256 as a values.


But zsh also supports 24bit color assignments as well:
for example, `printf '\x1b[38;2;%s;%s;%sm' $RED $GREEN $BLUE` (and `[48;2` for 
background).


And I'd very like to make custom 24bit hl-theme to match my custom prompt 
theme.


Thanks in advance! :D


> FSH now supports 256-color themes. I must say that the difference from
> the default rigid 8-color palette is quite drastic. Asciinema
> recording presenting six shipped themes:
> https://asciinema.org/a/183814
> 
> > Hello
> > Decided to write because it will be all colorful images:
> > 
> > a) colorizing of assignments:
> > 
> > http://psprint.blinkenshell.org/assign.png
> > 
> > b) colorizing of typeset/export/etc. assignments (different state-path
> > in parser):
> > 
> > http://psprint.blinkenshell.org/typeset.png
> > 
> > c) special math-mode for zcalc
> > 
> > http://psprint.blinkenshell.org/fsyh-zcalc.png
> > 
> > d) the detection of blank variables above in zcalc – also in advanced way:
> > 
> > https://asciinema.org/a/3iHdW7gYYrJOyhiHPHLTXnzKc
> > 
> > All in fast-syntax-highlighting,
> > https://github.com/zdharma/fast-syntax-highlighting
> > 
> > --
> > Best regards,
> > Sebastian Gniazdowski


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-27 15:54   ` Vadim A. Misbakh-Soloviov
@ 2018-05-28 10:03     ` Sebastian Gniazdowski
  2018-05-28 14:09       ` Vadim A. Misbakh-Soloviov
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-05-28 10:03 UTC (permalink / raw)
  To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users

On 27 May 2018 at 17:54, Vadim A. Misbakh-Soloviov <zsh@mva.name> wrote:
> As far as I see from themes (ini-files) there is support for "named" colors
> and 0-256 as a values.

Yes simple ini file, in hope someone will contribute more easily, than
to Zsh script file that is directly parsed by Zsh.

> But zsh also supports 24bit color assignments as well:
> for example, `printf '\x1b[38;2;%s;%s;%sm' $RED $GREEN $BLUE` (and `[48;2` for
> background).

I think Zsh doesn't support truecolor internally. The color names or
numbers are used in region_highlight array in strings like
"fg=110,bold" and here there is no way to specify 24 bit color value.
I was earlier looking for 24 bit color support in ncurses, and it's
rather the same story, the library is fixed on 256 value integers and
cannot be easily adapted to support 24 bit values.

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-28 10:03     ` Sebastian Gniazdowski
@ 2018-05-28 14:09       ` Vadim A. Misbakh-Soloviov
  2018-05-28 15:53         ` Sebastian Gniazdowski
  0 siblings, 1 reply; 12+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2018-05-28 14:09 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

> I think Zsh doesn't support truecolor internally.
Doesn't that: https://i.imgur.com/FDFf8jn.png mean it does?

> The color names or numbers are used in region_highlight array in strings
> like "fg=110,bold" and here there is no way to specify 24 bit color value.

Yup, that's what I talk about: it would be nice to have an ability to specify 
them. Although, I even agree on some shell env file with [magic] definitions 
instead of ini to make it work at least in my dotfiles.

> I was earlier looking for 24 bit color support in ncurses, and it's
> rather the same story, the library is fixed on 256 value integers and
> cannot be easily adapted to support 24 bit values.

Yup, there was some problem about truecolor in ncurses, but since 6.0.20180121 
(or, probably, a bit earlier, since I use that in neovim-under-tmux for a long 
time already) it does support truecolor through terminfo's `Tc` (AFAIRC) 
capability.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-28 14:09       ` Vadim A. Misbakh-Soloviov
@ 2018-05-28 15:53         ` Sebastian Gniazdowski
  0 siblings, 0 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-05-28 15:53 UTC (permalink / raw)
  To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users

On 28 May 2018 at 16:09, Vadim A. Misbakh-Soloviov <zsh@mva.name> wrote:
>> I think Zsh doesn't support truecolor internally.
> Doesn't that: https://i.imgur.com/FDFf8jn.png mean it does?

It's rather a user-end use of true color escape codes, than Zshell's
automatic coloring via region_highlight or complist module.

>> The color names or numbers are used in region_highlight array in strings
>> like "fg=110,bold" and here there is no way to specify 24 bit color value.
>
> Yup, that's what I talk about: it would be nice to have an ability to specify
> them. Although, I even agree on some shell env file with [magic] definitions
> instead of ini to make it work at least in my dotfiles.

The ini is my own invention for fast-syntax-highlighting, directly it
has nothing to do with Zshell's region_highlight.

True color is a great thing, I hope someone will start recognition if
it's possible with Zshell.

> Yup, there was some problem about truecolor in ncurses, but since 6.0.20180121
> (or, probably, a bit earlier, since I use that in neovim-under-tmux for a long
> time already) it does support truecolor through terminfo's `Tc` (AFAIRC)
> capability.

That's great news, I hoped that hacking is limitless and a way around
color pair numbers and definitions will be found. Do you know how was
ncurses API adapted for this true-color support?

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Colorful new fast-syntax-highlighting
  2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
  2018-05-25 12:07   ` Daniel Shahaf
@ 2018-06-10 21:28   ` Sebastian Gniazdowski
  1 sibling, 0 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-10 21:28 UTC (permalink / raw)
  To: Vadim A. Misbakh-Soloviov; +Cc: Zsh Users

On 23 May 2018 at 21:00, Vadim A. Misbakh-Soloviov <zsh@mva.name> wrote:
> Also, how about freezing on path coloring in "big" direcotires (with millions
> of files)?
> And how about "dead" mounts (that also leads zsh to go into D-state)?

Today I've implemented asynchronous path checking, it should solve the problem:

https://asciinema.org/a/V18uHIn2BR0OVfRsmxyqkVi7K

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-10 21:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 16:48 Colorful new fast-syntax-highlighting Sebastian Gniazdowski
2018-05-23 19:00 ` Vadim A. Misbakh-Soloviov
2018-05-25 12:07   ` Daniel Shahaf
2018-05-25 12:19     ` Vadim A. Misbakh-Soloviov
2018-05-25 12:35       ` Daniel Shahaf
2018-05-25 15:23       ` Sebastian Gniazdowski
2018-06-10 21:28   ` Sebastian Gniazdowski
2018-05-27 14:46 ` Sebastian Gniazdowski
2018-05-27 15:54   ` Vadim A. Misbakh-Soloviov
2018-05-28 10:03     ` Sebastian Gniazdowski
2018-05-28 14:09       ` Vadim A. Misbakh-Soloviov
2018-05-28 15:53         ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).