zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.74k stars 122 forks source link

New {file} formatter #552

Closed psprint closed 5 months ago

psprint commented 11 months ago

Description

I'm refreshing the old pr #421 taking into account @vladdoster's objections about the number of colors used to highlight (now there is 1 color for extensions instead of 2). Also, a new feature – highlighting of the version number (like e.g. v1.5). Furthermore, I'm submitting a branch that's on top of #550 , after merging this PR the commits will disappear from this PR.

Related Issue(s)

421

Motivation and Context

The flexibility behind +zinit-message allows for sophisticated highlighters. Here the {file} style gets a private function-highlighter to color file extensions and version automatically with a distinct color.

Usage examples

Default theme: 2023-07-30-154441_1901x252_scrot

Blue theme: 2023-07-30-154422_1895x231_scrot

Gold theme: 2023-07-30-154502_1894x249_scrot

How Has This Been Tested?

Via the above invocations of +zinit-message interactively.

Types of changes

Checklist:

psprint commented 11 months ago

@vladdoster @pschmitt @alichtman ping :)

psprint commented 10 months ago

@vladdoster: ping, The version coloring is cool and should be merged