Prepare for nvim
This commit is contained in:
		
							parent
							
								
									807818911d
								
							
						
					
					
						commit
						65f913310a
					
				
					 4 changed files with 16 additions and 4 deletions
				
			
		
							
								
								
									
										8
									
								
								.bin/.e
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								.bin/.e
									
										
									
									
									
								
							|  | @ -13,6 +13,8 @@ declare -A mapper=( | ||||||
| 	["git"]="$HOME/.config/git/config" | 	["git"]="$HOME/.config/git/config" | ||||||
| 	["git-ignore"]="$HOME/.config/git/ignore" | 	["git-ignore"]="$HOME/.config/git/ignore" | ||||||
| 	["home-manager"]="$HOME/.config/nixpkgs/home.nix" | 	["home-manager"]="$HOME/.config/nixpkgs/home.nix" | ||||||
|  | 	["nvim"]="$HOME/.config/nvim/" | ||||||
|  | 	["nvim.packer"]="$HOME/.config/nvim/lua/user/packer.lua" | ||||||
| 	["polybar"]="$HOME/.config/polybar" | 	["polybar"]="$HOME/.config/polybar" | ||||||
| 	["qutebrowser"]="$HOME/.config/qutebrowser/common.py" | 	["qutebrowser"]="$HOME/.config/qutebrowser/common.py" | ||||||
| 	["starship"]="$HOME/.config/starship.toml" | 	["starship"]="$HOME/.config/starship.toml" | ||||||
|  | @ -37,7 +39,13 @@ fi | ||||||
| target="${mapper["$1"]}" | target="${mapper["$1"]}" | ||||||
| if [ -n "$target" ] | if [ -n "$target" ] | ||||||
| then | then | ||||||
|  | 	if [ -d "$target" ] | ||||||
|  | 	then | ||||||
|  | 		cd "$target" | ||||||
|  | 		$EDITOR . | ||||||
|  | 	else | ||||||
| 		$EDITOR "$target" | 		$EDITOR "$target" | ||||||
|  | 	fi | ||||||
| else | else | ||||||
| 	echo "Dotfile not found. Use --list (-l) to show all options." | 	echo "Dotfile not found. Use --list (-l) to show all options." | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | @ -5,8 +5,9 @@ _autoinstall_base () { | ||||||
| 		"$HOME/.config/vim/autoload/plug.vim" \ | 		"$HOME/.config/vim/autoload/plug.vim" \ | ||||||
| 		&& [ -x "$(command -v vim)" ] && yes | vim +'PlugInstall --sync' +qa --not-a-term | 		&& [ -x "$(command -v vim)" ] && yes | vim +'PlugInstall --sync' +qa --not-a-term | ||||||
| 
 | 
 | ||||||
| 	#_autoinstall_git "https://github.com/AstroNvim/AstroNvim" "$HOME/.config/nvim" \ | 	_autoinstall_git "https://github.com/wbthomason/packer.nvim" \ | ||||||
| 	#	&& [ -x "$(command -v nvim)" ] && nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' | 		"$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" \ | ||||||
|  | 		&& [ -x "$(command -v nvim)" ] && nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' | ||||||
| 
 | 
 | ||||||
| 	[ ! -x "$(command -v starship)" ] \ | 	[ ! -x "$(command -v starship)" ] \ | ||||||
| 		&& curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh | 		&& curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh | ||||||
|  | @ -67,7 +68,7 @@ _autoinstall_git () { | ||||||
| 	then | 	then | ||||||
| 		echo "Installing repo $1 to $2" | 		echo "Installing repo $1 to $2" | ||||||
| 		mkdir -p "$2" | 		mkdir -p "$2" | ||||||
| 		git clone "$1" "$2" >/dev/null 2>&1 | 		git clone --depth=1 "$1" "$2" >/dev/null 2>&1 | ||||||
| 		return 0 | 		return 0 | ||||||
| 	fi | 	fi | ||||||
| 	return 1 | 	return 1 | ||||||
|  |  | ||||||
|  | @ -77,6 +77,8 @@ alias xdebug='XDEBUG_CONFIG="remote_host=127.0.0.1 remote_port=9003"' | ||||||
| 
 | 
 | ||||||
| [ -x "$(command -v moar)" ] && alias less='moar' | [ -x "$(command -v moar)" ] && alias less='moar' | ||||||
| 
 | 
 | ||||||
|  | [ -x "$(command -v nvim)" ] && alias vim='nvim' | ||||||
|  | 
 | ||||||
| [ -x "$(command -v rmtrash)" ] && alias rm='rmtrash' | [ -x "$(command -v rmtrash)" ] && alias rm='rmtrash' | ||||||
| [ -x "$(command -v rmdirtrash)" ] && alias rmdir='rmdirtrash' | [ -x "$(command -v rmdirtrash)" ] && alias rmdir='rmdirtrash' | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -28,6 +28,7 @@ export DOCKER_BUILDKIT=1 | ||||||
| export DRONE_SERVER='https://ci.serguzim.me' | export DRONE_SERVER='https://ci.serguzim.me' | ||||||
| 
 | 
 | ||||||
| _editor="$(which vim)" | _editor="$(which vim)" | ||||||
|  | [ -x "$(command -v nvim)" ] && _editor="$(which nvim)" | ||||||
| export EDITOR="$_editor" | export EDITOR="$_editor" | ||||||
| 
 | 
 | ||||||
| export GOPATH="$XDG_DATA_HOME/go" | export GOPATH="$XDG_DATA_HOME/go" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue