Skip to content

Commit

Permalink
feature: add neovim plus config (#15)
Browse files Browse the repository at this point in the history
* feature: add nvim config

* docs: update readme

* chore: bump version
  • Loading branch information
juliantellez authored Aug 25, 2020
1 parent 895576a commit 53107c5
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 3 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/juliantellez/up/master/ins

# Editors
- [visual-studio-code](https://code.visualstudio.com/): Code editor redefined and optimized for building and debugging modern web and cloud applications.
- [vim](https://github.com/vim/vim): Improved version of the good old UNIX editor Vi.
- [neoVim](https://github.com/neovim/neovim): Vim-fork focused on extensibility and usability.

# Databases
- [postgress](https://www.postgresql.org/): reliable and robust object-relational database.
Expand Down Expand Up @@ -157,6 +157,17 @@ follow the description below and import them from the color_presets folder.
Iterm2 > Preferences > Profiles > Colors > Color Presets > Import
```

# NeoVim

Neovim plugins are powered by [vim Plug](https://github.com/junegunn/vim-plug).

```
$ nvim
:PlugStatus
:PlugInstall
```

# Acknowledgements
These configs and dotfiles stand on the shoulders of the following giants:

Expand Down
66 changes: 66 additions & 0 deletions config/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"-----PLUGIN SETTINGS-------

" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')

" Intellisense engine for Vim8 & Neovim
" https://github.com/neoclide/coc.nvim
Plug 'neoclide/coc.nvim', {'branch': 'release'}

" Lean & mean status/tabline for vim that's light as air
" https://github.com/vim-airline/vim-airline
Plug 'bling/vim-airline'

" A tree explorer plugin for vim.
" https://github.com/preservim/nerdtree
Plug 'scrooloose/nerdtree'

" A plugin of NERDTree showing git status
" https://github.com/Xuyuanp/nerdtree-git-plugin
Plug 'Xuyuanp/nerdtree-git-plugin'

" Extra syntax and highlight for nerdtree files
" https://github.com/tiagofumo/vim-nerdtree-syntax-highlight
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'

" A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.
" https://github.com/airblade/vim-gitgutter
Plug 'airblade/vim-gitgutter'

" Fuzzy file, buffer, mru, tag, etc finder.
" https://github.com/kien/ctrlp.vim
Plug 'ctrlpvim/ctrlp.vim'

" VIM Darcula Theme
" https://github.com/blueshirts/darcula
Plug 'blueshirts/darcula'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()

"-----GENERAL SETTINGS-------
syntax enable
colorscheme darcula

let g:auto_save = 1 "enable AutoSave on startup
set laststatus=2 "see the current mode, file name, file status, ruler, etc...2

set number "Show line numbers
set autoindent "Auto-indent new lines
set shiftwidth=2 "Number of auto-indent spaces
set smartindent "Enable smart-indent
set smarttab "Enable smart-tabs
set softtabstop=2 "Number of spaces per Tab

set ruler "Show row and column ruler information
set undolevels=1000 "Number of undo levels
set backspace=indent,eol,start "Backspace behaviour

"-----SEARCH-------
set ignorecase "case insensitive
set smartcase "use case if any caps used
set incsearch "show match as search proceeds
set hlsearch "search highlighting

autocmd VimEnter * NERDTree "open NERDTree automatically
let g:NERDTreeIgnore = ['^node_modules$']
31 changes: 31 additions & 0 deletions dependencies/nvim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

. $(pwd)/helpers/ask.sh
. $(pwd)/helpers/create_backup.sh
. $(pwd)/helpers/print.sh

install_vim_plug () {
local file=$HOME/.config/nvim/autoload/plug.vim

if ! [[ -f $file ]]; then
curl -fLo $file --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
print_success "Vim Plug installed"
else
print_success "Vim Plug already installed"
fi
}

copy_vim_plug_configuration () {
local file=$HOME/.config/nvim/init.vim

if ask "Would you like to copy this vim plug config? ${1}" Y; then
create_backup "nvim" "init.vim" $file

cp $1 $file
print_success "nvim config updated"
else
print_error "Aborting..."
fi
}

copy_vim_plug_configuration /Users/juliantellez/github/juliantellez/up/config/nvim/init.vim
5 changes: 5 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
. $(pwd)/dependencies/mac.sh
. $(pwd)/dependencies/iterm2.sh
. $(pwd)/dependencies/nodejs.sh
. $(pwd)/dependencies/nvim.sh
. $(pwd)/dependencies/zsh/autocomplete.sh
. $(pwd)/dependencies/zsh/powerlevel9k.sh
. $(pwd)/dependencies/zsh/syntax_highlight.sh
Expand Down Expand Up @@ -68,6 +69,10 @@ steps(){
step "Config: Copy zshrc"
copy_zsh_configuration $(pwd)/config/.zshrc

step "Config: nvim"
install_vim_plug
copy_nvim_configuration $(pwd)/config/nvim/init.vim

step "Config: mac"
configure_mac
}
Expand Down
2 changes: 1 addition & 1 deletion packages/brews.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ hub
kubectl
kops
mas
neovim
postgresql
redis
tree
terraform
the_silver_searcher
vault
vim
z
2 changes: 1 addition & 1 deletion utils/version.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
UP_VERSION="0.1.7"
UP_VERSION="0.2.0"

0 comments on commit 53107c5

Please sign in to comment.