Last active
December 19, 2018 13:22
-
-
Save trigun117/e5f6fb1c2a6e1fe054fe04c763804387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
UPDATECOMMAND="apt update" | |
INSTALLCOMMAND="apt install curl fuse git python3-pip -y" | |
# Update and install all dependencies | |
if [ $UID != 0 ]; then | |
sudo bash -c "$UPDATECOMMAND && $INSTALLCOMMAND" | |
else | |
$UPDATECOMMAND && $INSTALLCOMMAND | |
fi | |
# Download Neovim | |
mkdir -p $HOME/apps/neovim | |
cd $HOME/apps/neovim | |
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage | |
chmod u+x nvim.appimage | |
shopt -s expand_aliases | |
echo 'alias nvim="$HOME/apps/neovim/nvim.appimage"' >> ~/.bashrc && source ~/.bashrc | |
# Install Plug | |
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
# Configure Neovim | |
pip3 install --user neovim | |
cd ~ | |
mkdir -p .config/nvim | |
# init.vim data | |
echo "call plug#begin() | |
\" Plugins | |
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } | |
Plug 'AndrewRadev/splitjoin.vim' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'tpope/vim-fugitive' | |
Plug 'raimondi/delimitmate' | |
Plug 'SirVer/ultisnips' | |
Plug 'Shougo/deoplete.nvim' | |
Plug 'zchee/deoplete-go', { 'do': 'make'} | |
Plug 'airblade/vim-gitgutter' | |
Plug 'ekalinin/dockerfile.vim' | |
Plug 'tomasr/molokai' | |
Plug 'mattn/emmet-vim' | |
call plug#end() | |
\" Settings | |
\" neovim | |
set encoding=utf-8 | |
set t_Co=256 | |
set number | |
set cursorline | |
set linebreak | |
\" deoplete | |
let g:deoplete#enable_at_startup = 1 | |
\" vim-airline-theme | |
let g:airline_theme='badwolf' | |
\" let g:airline_powerline_fonts = 1 | |
\" vim-go | |
set autowrite | |
let g:go_list_type = \"quickfix\" | |
let g:go_highlight_fields = 1 | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_function_calls = 1 | |
let g:go_highlight_extra_types = 1 | |
let g:go_highlight_build_constraints = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_operators = 1 | |
let g:go_highlight_structs = 1 | |
let g:go_highlight_types = 1 | |
let g:go_auto_sameids = 1 | |
let g:go_auto_type_info = 1 | |
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] | |
let g:go_metalinter_autosave = 1 | |
" > ~/.config/nvim/init.vim | |
# Install Plugins | |
cd $HOME/apps/neovim | |
./nvim.appimage -c 'PlugInstall' -c 'q' -c 'UpdateRemotePlugins' -c '!echo "\" molokai" >> ~/.config/nvim/init.vim' -c '!echo "syntax enable">> ~/.config/nvim/init.vim' -c '!echo "colorscheme molokai">> ~/.config/nvim/init.vim' -c 'q' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment