mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Merged develop
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
list=( ${(Q)"${(z)$(<<\EO:list
|
||||
'aspell-dictionaries' 'determine-rebottle-runners' 'postgresql-upgrade-database' 'services'
|
||||
EO:list
|
||||
)}"} )
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,41 @@
|
||||
|
||||
# configure keeping history of commands
|
||||
|
||||
HISTSIZE=200
|
||||
|
||||
# TODO: move to $ZDOTDIR/.zsh_history
|
||||
HISTFILE=~/.zsh_history
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt incappendhistory
|
||||
|
||||
# Allow useful scripts in ~/.bin to be in the search path.
|
||||
export PATH=~/.bin:$PATH
|
||||
|
||||
autoload -Uz compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
# compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
|
||||
autoload -U up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search
|
||||
zle -N up-line-or-beginning-search
|
||||
zle -N down-line-or-beginning-search
|
||||
|
||||
# Colors
|
||||
autoload -Uz colors && colors
|
||||
|
||||
# Load Useful Functions
|
||||
source "$ZDOTDIR/zsh-functions"
|
||||
|
||||
zsh_add_file "zsh-aliases"
|
||||
zsh_add_file "zsh-zinit"
|
||||
zsh_add_file "zsh-exports"
|
||||
|
||||
export EDITOR="nvim"
|
||||
# Plugins
|
||||
zsh_add_plugin "zsh-users/zsh-autosuggestions"
|
||||
zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
|
||||
zsh_add_plugin "sindresorhus/pure"
|
||||
|
||||
# Prompt
|
||||
fpath+="$ZDOTDIR/plugins/pure"
|
||||
autoload -U promptinit; promptinit
|
||||
prompt pure
|
||||
|
||||
cat < "$ZDOTDIR/banner"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#alias zshconfig="$ZDOTDIR"
|
||||
alias zdots() { nvim "$ZDOTDIR" }
|
||||
alias dots() { nvim ~/.dotfiles }
|
||||
alias reload() { source "$ZDOTDIR/.zshrc" }
|
||||
|
||||
alias mkcd() { mkdir $1 && cd $1 }
|
||||
alias l() { ls -lah "$@" }
|
||||
|
||||
17
zsh/.config/zsh/zsh-exports
Normal file
17
zsh/.config/zsh/zsh-exports
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
HISTSIZE=200
|
||||
HISTFILE=$ZDOTDIR/history
|
||||
|
||||
# Allow useful scripts in ~/.bin to be in the search path.
|
||||
export PATH=~/.bin:$PATH
|
||||
|
||||
# zsh-completions installed by homebrew
|
||||
if type brew &>/dev/null; then
|
||||
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
fi
|
||||
|
||||
export EDITOR="nvim"
|
||||
@@ -2,3 +2,30 @@
|
||||
function zsh_add_file() {
|
||||
[ -f "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1"
|
||||
}
|
||||
|
||||
function zsh_add_plugin() {
|
||||
PLUGIN_NAME=$(echo $1 | cut -d "/" -f 2)
|
||||
if [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then
|
||||
# For plugins
|
||||
zsh_add_file "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" || \
|
||||
zsh_add_file "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
|
||||
else
|
||||
git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME"
|
||||
fi
|
||||
}
|
||||
|
||||
function zsh_add_completion() {
|
||||
PLUGIN_NAME=$(echo $1 | cut -d "/" -f 2)
|
||||
if [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then
|
||||
# For completions
|
||||
completion_file_path=$(ls $ZDOTDIR/plugins/$PLUGIN_NAME/_*)
|
||||
fpath+="$(dirname "${completion_file_path}")"
|
||||
zsh_add_file "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
|
||||
else
|
||||
git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME"
|
||||
fpath+=$(ls $ZDOTDIR/plugins/$PLUGIN_NAME/_*)
|
||||
[ -f $ZDOTDIR/.zccompdump ] && $ZDOTDIR/.zccompdump
|
||||
fi
|
||||
completion_file="$(basename "${completion_file_path}")"
|
||||
if [ "$2" = true ] && compinit "${completion_file:1}"
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
|
||||
### Added by Zinit's installer
|
||||
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
||||
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
|
||||
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
||||
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
|
||||
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
||||
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
||||
fi
|
||||
|
||||
source "$HOME/.zinit/bin/zinit.zsh"
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
|
||||
# Load a few important annexes, without Turbo
|
||||
# (this is currently required for annexes)
|
||||
zinit light-mode for \
|
||||
zinit-zsh/z-a-rust \
|
||||
zinit-zsh/z-a-as-monitor \
|
||||
zinit-zsh/z-a-patch-dl \
|
||||
zinit-zsh/z-a-bin-gem-node
|
||||
|
||||
### End of Zinit's installer chunk
|
||||
|
||||
# configure pure-prompt
|
||||
zinit ice compile '(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
||||
zinit light sindresorhus/pure
|
||||
|
||||
|
||||
zinit wait lucid for \
|
||||
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
|
||||
zdharma/fast-syntax-highlighting \
|
||||
blockf \
|
||||
zsh-users/zsh-completions \
|
||||
atload"!_zsh_autosuggest_start" \
|
||||
zsh-users/zsh-autosuggestions
|
||||
1
zsh/.zshenv
Normal file
1
zsh/.zshenv
Normal file
@@ -0,0 +1 @@
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
@@ -1,2 +0,0 @@
|
||||
export ZDOTDIR=$HOME/.config/zsh
|
||||
source "$HOME/.config/zsh/.zshrc"
|
||||
Reference in New Issue
Block a user