diff options
| author | Sylvain Herlédan <sylvain.herledan@hrafnagud.info> | 2018-09-01 20:45:42 +0200 |
|---|---|---|
| committer | Sylvain Herlédan <sylvain.herledan@hrafnagud.info> | 2018-09-01 20:45:42 +0200 |
| commit | baa3ce0c68e283791275162259112634d6fbb401 (patch) | |
| tree | 0c919fc6450d501862b283eee3444b4b5e0848dc | |
| parent | 9970124cc496a05f278cc17a3fb328a064c4fc2b (diff) | |
| download | dotfiles-baa3ce0c68e283791275162259112634d6fbb401.tar.gz dotfiles-baa3ce0c68e283791275162259112634d6fbb401.tar.bz2 dotfiles-baa3ce0c68e283791275162259112634d6fbb401.zip | |
Add ZSH on-the-fly highlighting.
| -rwxr-xr-x | setup.sh | 7 | ||||
| -rw-r--r-- | zshrc | 13 |
2 files changed, 19 insertions, 1 deletions
@@ -123,6 +123,7 @@ install_oh_my_zsh() local tools_dir="${1}"; shift; local install_dir="${1}"; shift; local link_path="${install_dir}/.oh-my-zsh"; + local plugins_dir="${tools_dir}/oh-my-zsh/custom/plugins"; if [ ! -h "${link_path}" -o ! -d "${link_path}" ]; then @@ -136,6 +137,12 @@ install_oh_my_zsh() "${tools_dir}/oh-my-zsh" \ "${install_dir}/config/oh-my-zsh" fi + + if [ ! -d "${plugins_dir}/zsh-syntax-highlighting" ] + then + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ + "${plugins_dir}/zsh-syntax-highlighting" + fi } # @@ -2,9 +2,20 @@ # ----------------------------------------------------------------------------- ZSH="${HOME}/.local/tools/oh-my-zsh" ZSH_THEME="nanotech" -plugins=(git archlinux gnu-utils pip python ssh-agent) +plugins=(git archlinux gnu-utils pip python ssh-agent zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh +# Highlighting configuration +ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) +ZSH_HIGHLIGHT_STYLES[alias]=none +ZSH_HIGHLIGHT_STYLES[builtin]=none +ZSH_HIGHLIGHT_STYLES[command]=none +ZSH_HIGHLIGHT_STYLES[hashed-command]=none +ZSH_HIGHLIGHT_STYLES[function]=fg=034,bold +ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=105 +ZSH_HIGHLIGHT_STYLES[path]=none +ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=yellow,bold} + source "${HOME}/.local/config/aliases" source "${HOME}/.config/user-dirs.dirs" |
