Neovim + XDG setup.
This commit is contained in:
parent
ed7aa63a56
commit
d64674a293
@ -1,17 +0,0 @@
|
|||||||
*.swp
|
|
||||||
*~
|
|
||||||
.*history*
|
|
||||||
.cache
|
|
||||||
.config/vim
|
|
||||||
.config/zsh/caches
|
|
||||||
.config/zsh/plugins
|
|
||||||
.config/zsh/themes
|
|
||||||
.fdignore
|
|
||||||
.fzf*
|
|
||||||
.git*
|
|
||||||
.lesshst
|
|
||||||
.local
|
|
||||||
.python*
|
|
||||||
.ssh/known_hosts
|
|
||||||
.vim
|
|
||||||
.zcomp*
|
|
16
fd/ignore
Normal file
16
fd/ignore
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
*.swp
|
||||||
|
*~
|
||||||
|
.*history*
|
||||||
|
.cache
|
||||||
|
.config/nvim/runtime
|
||||||
|
.config/nvim/plugins
|
||||||
|
.config/zsh
|
||||||
|
nvim/runtime
|
||||||
|
nvim/plugins
|
||||||
|
zsh
|
||||||
|
.git*
|
||||||
|
.lesshst
|
||||||
|
.python*
|
||||||
|
.ssh/known_hosts
|
||||||
|
.vim
|
||||||
|
.zcomp*
|
41
install.sh
41
install.sh
@ -1,47 +1,32 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# cleaning & preparing
|
# cleaning
|
||||||
rm -rf ~/.bash* ~/.profile
|
rm -rf ~/.bash* ~/.profile
|
||||||
rm -rf ~/.dotfiles
|
rm -rf ~/.dotfiles
|
||||||
|
rm -rf ~/.config/fd ~/.config/git ~/.config/nvim ~/.config/tmux ~/.config/zsh ~/.zshrc
|
||||||
|
rm -rf ~/.fdignore ~/.fzf.bash ~/.fzf.zsh ~/.gitconfig ~/.gitignore ~/.history ~/.tmux.conf ~/.zcomp* ~/.zsh*
|
||||||
|
|
||||||
# repo + preparations
|
# repo + preparations
|
||||||
git clone https://github.com/ftpd/dotfiles.git ~/.dotfiles
|
git clone https://github.com/ftpd/dotfiles.git ~/.dotfiles
|
||||||
mkdir -p ~/.config
|
mkdir -p ~/.cache ~/.config/local ~/.config/nvim ~/.config/zsh
|
||||||
|
|
||||||
## vim
|
## neovim
|
||||||
# cleaning
|
mkdir -p ~/.config/nvim/runtime
|
||||||
rm -rf ~/.vim* ~/.config/vim
|
ln -sf ~/.dotfiles/nvim/autoload ~/.config/nvim/runtime
|
||||||
mkdir -p ~/.config/vim/runtime
|
ln -sf ~/.dotfiles/nvim/init.vim ~/.config/nvim/init.vim
|
||||||
# installing
|
|
||||||
ln -sf ~/.dotfiles/vim/autoload ~/.config/vim/runtime
|
|
||||||
ln -sf ~/.dotfiles/vim/vimrc ~/.vimrc
|
|
||||||
|
|
||||||
## .gitignore
|
## .gitignore
|
||||||
# cleaning
|
ln -sf ~/.dotfiles/git ~/.config/
|
||||||
rm -rf ~/.gitignore
|
|
||||||
# installing
|
|
||||||
ln -sf ~/.dotfiles/conf/gitignore ~/.gitignore
|
|
||||||
git config --global core.excludesfile ~/.gitignore
|
|
||||||
|
|
||||||
## .fdignore
|
## fdignore
|
||||||
# cleaning
|
ln -sf ~/.dotfiles/fd ~/.config/
|
||||||
rm -rf ~/.fdignore
|
|
||||||
# installing
|
|
||||||
ln -sf ~/.dotfiles/conf/fdignore ~/.fdignore
|
|
||||||
|
|
||||||
## tmux
|
## tmux
|
||||||
# cleaning
|
ln -sf ~/.dotfiles/tmux ~/.config/
|
||||||
rm -rf ~/.tmux.conf
|
|
||||||
# installing
|
|
||||||
ln -sf ~/.dotfiles/conf/tmux.conf ~/.tmux.conf
|
|
||||||
|
|
||||||
## zsh
|
## zsh
|
||||||
# cleaning
|
mkdir -p ~/.cache/zsh ~/.config/zsh/caches ~/.config/zsh/plugins ~/.config/zsh/themes
|
||||||
rm -rf ~/.zsh* ~/.zcomp* ~/.config/zsh/
|
|
||||||
mkdir -p ~/.config/zsh/caches ~/.config/zsh/plugins ~/.config/zsh/themes
|
|
||||||
# dependiences
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.config/zsh/plugins/zsh-autosuggestions
|
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.config/zsh/plugins/zsh-autosuggestions
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/plugins/zsh-syntax-highlighting
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/plugins/zsh-syntax-highlighting
|
||||||
git clone https://github.com/romkatv/powerlevel10k.git ~/.config/zsh/themes/powerlevel10k
|
git clone https://github.com/romkatv/powerlevel10k.git ~/.config/zsh/themes/powerlevel10k
|
||||||
# installing
|
|
||||||
ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc
|
ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc
|
||||||
|
25
zsh/zshrc
25
zsh/zshrc
@ -1,31 +1,34 @@
|
|||||||
|
export XDG_CONFIG_HOME=~/.config
|
||||||
|
export XDG_DATA_HOME=~/.cache
|
||||||
|
|
||||||
bindkey -e
|
bindkey -e
|
||||||
autoload -U compinit && compinit -d ~/.config/zsh/caches/zcompdump
|
|
||||||
autoload -U promptinit && promptinit
|
autoload -U promptinit && promptinit
|
||||||
|
autoload -U compinit && compinit -d $XDG_DATA_HOME/zsh/zcompdump
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
|
|
||||||
export HISTSIZE=10000
|
export HISTSIZE=10000
|
||||||
SAVEHIST=$HISTSIZE
|
SAVEHIST=$HISTSIZE
|
||||||
HISTFILE=~/.history
|
HISTFILE=$XDG_DATA_HOME/zsh/history
|
||||||
setopt inc_append_history
|
setopt inc_append_history
|
||||||
setopt share_history
|
setopt share_history
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
[ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ] && source $XDG_CONFIG_HOME/fzf/fzf.zsh
|
||||||
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.config/local.fdignore'
|
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
||||||
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file ~/.config/local.fdignore'
|
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
||||||
export FZF_DEFAULT_OPTS="-e --multi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
|
export FZF_DEFAULT_OPTS="-e --multi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
|
||||||
export FZF_CTRL_R_OPTS="-e --layout=reverse --preview=''"
|
export FZF_CTRL_R_OPTS="-e --layout=reverse --preview=''"
|
||||||
_fzf_compgen_path() {
|
_fzf_compgen_path() {
|
||||||
fd -H -L --ignore-file ~/.config/local.fdignore . "$1"
|
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd . "$1"
|
||||||
}
|
}
|
||||||
_fzf_compgen_dir() {
|
_fzf_compgen_dir() {
|
||||||
fd -H -L --ignore-file ~/.config/local.fdignore --type d . "$1"
|
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd --type d . "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
source ~/.config/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source $XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
source ~/.config/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source $XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
source ~/.config/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
source $XDG_CONFIG_HOME/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
source ~/.dotfiles/zsh/p10k.zsh
|
source ~/.dotfiles/zsh/p10k.zsh
|
||||||
|
|
||||||
[ -e ~/.config/local.zsh ] && source ~/.config/local.zsh
|
[ -e $XDG_CONFIG_HOME/local/zsh ] && source $XDG_CONFIG_HOME/local/zsh
|
||||||
|
Loading…
Reference in New Issue
Block a user