dotfiles-linux-bash/config/nvim/init.vim
2020-05-06 10:23:54 -04:00

96 lines
2.6 KiB
VimL

let mapleader = " "
call plug#begin('~/.vim/plugged')
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
Plug 'xolox/vim-misc'
Plug 'micha/vim-colors-solarized'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'airblade/vim-gitgutter'
Plug 'majutsushi/tagbar'
Plug 'vim-airline/vim-airline'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'wincent/command-t'
Plug 'mattn/emmet-vim'
Plug 'itchyny/calendar.vim'
Plug 'houtsnip/vim-emacscommandline'
Plug 'mhinz/vim-startify'
Plug 'jeetsukumaran/vim-buffergator'
Plug 'reinh/vim-makegreen'
Plug 'tbastos/vim-lua'
Plug 'wolfgangmehner/lua-support'
Plug 'drmingdrmer/vim-indent-lua'
"Plug 'shougo/denite.nvim'
Plug 'rust-lang/rust.vim'
Plug 'ap/vim-buftabline'
Plug 'enricobacis/vim-airline-clock'
Plug 'davidhalter/jedi-vim'
Plug 'ervandew/supertab'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'wincent/ferret'
Plug 'thoughtbot/vim-rspec'
Plug 'preservim/nerdtree'
call plug#end()
set tabstop=2
" Relative numbers and when not in buiffer set absolute numbers
set number relativenumber
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
" Colors
syntax enable
set background=dark
colorscheme solarized
"Calendar stuff
let g:calendar_google_calendar = 1
let g:calendar_google_task = 1
" Tab stuff
set hidden
nnoremap <Leader>/ :Ag<CR>
nnoremap <C-J> :bnext<CR>
nnoremap <C-K> :bprev<CR>
nnoremap <leader>L :Lua<CR>
nmap <leader>bq :bp <BAR> bd #<CR>
"Clock
let g:airline#extensions#clock#format = '%I:%M:%S %X'
map <Leader><Leader>, :call RunCurrentSpecFile()<CR>
map <Leader><Leader>. :call RunAllSpecs()<CR>
set shiftwidth=2
set tabstop=2
set expandtab
" use <tab> for trigger completion and navigate to the next complete item
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
let g:coc_node_path = "/home/tyrel/.nvm/versions/node/v12.14.0/bin/node"
inoremap <silent><expr> <Tab>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh()
map <C-o> :NERDTreeToggle<CR>
"close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif