dotfiles/vim/vimrc
2019-10-14 10:18:22 -04:00

111 lines
2.8 KiB
VimL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
set number
set relativenumber
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set hidden
set showtabline=1
set termguicolors
set ttyfast
set wildmenu
set title
set list
set listchars=tab:→\ ,eol,trail:⋅,extends:,precedes:,space:␣
set showbreak=
set timeoutlen=500
let g:mapleader="\<SPACE>"
let g:maplocallead=','
if has('nvim')
set inccommand=split
endif
if has("persistent_undo")
set undodir=$HOME/.undodir
set undofile
endif
let g:ale_set_baloons = 1
let g:ale_completion_enabled = 1
call plug#begin('~/.config/nvim/plugged')
"LSP Stuff
Plug 'w0rp/ale'
Plug 'ryanolsonx/vim-lsp-python'
Plug 'ryanolsonx/vim-lsp-typescript'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'machakann/vim-highlightedyank'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'morhetz/gruvbox'
Plug 'arzg/vim-corvine'
Plug 'tpope/vim-fugitive'
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-commentary'
Plug 'mbbill/undotree'
Plug 'elmcast/elm-vim'
Plug 'liuchengxu/vim-which-key'
"https://github.com/baverman/vial-http/blob/master/doc/tutorial.rst
"Plug 'baverman/vial'
"Plug 'baverman/vial-http'
call plug#end()
"Gruvbox config
" colorscheme gruvbox
set background=dark
let g:gruvbox_contrast_dark = 'soft'
colorscheme corvine
"Airline settings
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
let g:airline_theme='base16_tomorrow'
nnoremap <leader>u :UndotreeToggle<cr>
nnoremap <leader>h <C-W><C-H>
nnoremap <leader>j <C-W><C-J>
nnoremap <leader>k <C-W><C-K>
nnoremap <leader>l <C-W><C-L>
"ALE Keymaps and options
nnoremap <silent> <leader><Space>a a<C-X><C-O>
nnoremap <silent> <leader><Space>g :ALEGoToDefinition<CR>
nnoremap <silent> <leader><Space>f :ALEFix<CR>
let g:ale_fixers = {
\ 'python': ['add_blank_lines_for_python_control_statements', 'yapf']
\ }
"which-key
let g:which_key_map = {}
autocmd! User vim-which-key call which_key#register('<Space>', 'g:which_key_map')
let g:which_key_map[' '] = {
\ 'name' : '+ale' ,
\ 'a' : 'completions' ,
\ 'g' : 'go-to-definition' ,
\ 'f' : 'fix' ,
\ }
call which_key#register('<Space>', "g:which_key_map")
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
"rainbow-parens
autocmd VimEnter * RainbowParentheses
let g:rainbow#blacklist = [248]
let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']]