2022-03-20 20:20:01 +01:00
|
|
|
# zsh-syntax-highlighting theme, based on unikitty-reversible from
|
|
|
|
# <https://github.com/joshwlewis/base16-unikitty>. 256 colours.
|
|
|
|
|
|
|
|
function()
|
|
|
|
{
|
|
|
|
|
|
|
|
local -A _urc # unikitty-reversible colour
|
|
|
|
# From <https://gitlab.com/saalen/highlight> (translated to 256 colours)
|
2022-03-20 20:33:53 +01:00
|
|
|
# _urc[defaultbg]="#2e2a31"
|
2022-03-20 20:20:01 +01:00
|
|
|
# _urc[lighterbg]="#4b484e"
|
|
|
|
# _urc[selbg]="#69666b"
|
|
|
|
_urc[comments]="244" # #878589
|
|
|
|
_urc[dark]="248" # #a5a3a6
|
|
|
|
_urc[default]="251" # #c3c2c4
|
|
|
|
_urc[light]="255" # #e1e0e1
|
|
|
|
# _urc[lightbg]="#ffffff"
|
|
|
|
_urc[commands]="162" # #d8137f
|
|
|
|
_urc[constants]="166" # #d65407
|
|
|
|
_urc[variables]="172" # #dc8a0e
|
|
|
|
_urc[strings]="36" # #17ad98
|
|
|
|
_urc[regex]="39" # #149bda
|
|
|
|
_urc[builtins]="99" # #7864fa
|
|
|
|
_urc[keywords]="135" # #b33ce8
|
2022-03-20 21:44:53 +01:00
|
|
|
# _urc[deprecated]="#d41acd"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# <https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters/main>
|
|
|
|
typeset -gA ZSH_HIGHLIGHT_STYLES
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Builtins
|
|
|
|
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=${_urc[keywords]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[builtin]="fg=${_urc[builtins]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[function]="fg=${_urc[builtins]},bold"
|
|
|
|
# ZSH_HIGHLIGHT_STYLES[hashed-command]="fg=green,standout" # ???
|
|
|
|
ZSH_HIGHLIGHT_STYLES[alias]="fg=${_urc[builtins]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[suffix-alias]="fg=${_urc[builtins]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[global-alias]="fg=${_urc[builtins]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[autodirectory]="fg=${_urc[builtins]}"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Commands
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command]="fg=${_urc[commands]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[precommand]="fg=${_urc[builtins]},underline"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[arg0]="fg=${_urc[commands]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[process-substitution]="fg=${_urc[commands]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution]="fg=${_urc[variables]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]="fg=${_urc[variables]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]="fg=${_urc[variables]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]="fg=${_urc[builtins]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]="fg=${_urc[builtins]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]="fg=${_urc[regex]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]="fg=${_urc[regex]},bold"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Punctuation
|
|
|
|
ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=${_urc[default]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]="fg=${_urc[variables]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]="fg=${_urc[variables]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]="fg=${_urc[variables]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]="fg=${_urc[commands]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]="fg=${_urc[regex]},bold"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Text, quotes
|
|
|
|
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=${_urc[strings]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=${_urc[strings]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[rc-quote]="fg=${_urc[strings]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]="fg=${_urc[constants]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]="fg=${_urc[strings]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=${_urc[constants]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=${_urc[regex]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]="fg=${_urc[strings]}"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Variables, constants
|
|
|
|
ZSH_HIGHLIGHT_STYLES[assign]="fg=${_urc[constants]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[named-fd]="fg=${_urc[constants]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[numeric-fd]="fg=${_urc[constants]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]="fg=${_urc[variables]},bold"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Paths
|
|
|
|
ZSH_HIGHLIGHT_STYLES[path]="fg=${_urc[default]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[path_pathseparator]="fg=${_urc[default]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[path_prefix]="fg=${_urc[dark]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]="fg=${_urc[dark]}"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Misc
|
|
|
|
ZSH_HIGHLIGHT_STYLES[default]="fg=${_urc[default]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[comment]="fg=${_urc[comments]},italic"
|
2022-04-15 13:48:12 +02:00
|
|
|
ZSH_HIGHLIGHT_STYLES[unknown-token]="default"
|
2022-03-20 21:44:53 +01:00
|
|
|
ZSH_HIGHLIGHT_STYLES[globbing]="fg=${_urc[default]},bold"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=${_urc[builtins]}"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[redirection]="fg=${_urc[light]}"
|
2022-03-20 20:20:01 +01:00
|
|
|
|
2022-03-20 21:44:53 +01:00
|
|
|
# Brackets
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-error]="standout"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]="bold,underline"
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='none'
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='none'
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='none'
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='none'
|
|
|
|
ZSH_HIGHLIGHT_STYLES[bracket-level-5]='none'
|
2022-03-20 20:20:01 +01:00
|
|
|
|
|
|
|
}
|