Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created May 30, 2018 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbaxleyiii/5b8fa5ad5322d7dab0758df06991629b to your computer and use it in GitHub Desktop.
Save jbaxleyiii/5b8fa5ad5322d7dab0758df06991629b to your computer and use it in GitHub Desktop.
set nocompatible
set hidden
syntax enable
colorscheme norma
let g:airline_theme='bubblegum'
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" install Vundle bundles
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
call vundle#end()
call plug#begin('~/.vim/plugged')
if filereadable(expand("~/.vimrc.plugs"))
source ~/.vimrc.plugs
endif
call plug#end()
filetype plugin indent on
set fileformat=unix
set autoindent
set autoread
set backspace=indent,eol,start
set clipboard=unnamed
set directory-=.
set encoding=utf8
set expandtab
set ignorecase
set incsearch
set laststatus=2
set nolist
set number
set ruler
set scrolloff=3
set shiftwidth=2
set showcmd
set smartcase
set softtabstop=2
set tabstop=8
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc
set wildmenu
set wildmode=longest,list,full
set ve=onemore
" set term=screen-256color
set t_ut=
set mouse=a
set noshowmatch
set t_ZH=x27[3m
set t_ZR=x27[23m
set pastetoggle=<F9>
let mapleader = ','
inoremap jj <ESC>
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-l>l
noremap <leader>l :Align
noremap <leader>d :NERDTreeToggle<CR>
noremap <leader>f :NERDTreeFind<CR>
noremap <leader><space> :call whitespace#strip_trailing()<CR>
" noremap <leader>g :GitGutterToggle<CR>
noremap gcc :vsc Edit.CommentSelection<CR>
noremap gc :vsc Edit.CommentSelection<CR>
" autocmd FileType reason map <buffer> <D-M> :ReasonPrettyPrint<Cr>
let s:python_version=has("python3") ? 3 : 2
let g:ctrlp_cmd='CtrlPBuffer'
let g:ctrlp_cache_dir=$HOME . '/.vim/.cache/ctrlp'
let g:NERDSpaceDelims=1
let g:gitgutter_enabled=1
let g:indent_guides_auto_colors=0
let g:jsx_ext_required=0
let g:javascript_plugin_flow=0
let g:flow#enable = 0
let g:jsx_pragma_required=0
let g:typescript_indent_disabled=1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = 1
set completeopt+=menu,longest,menuone,preview
set shortmess+=c
set completeopt+=noinsert,noselect
" let g:mucomplete#enable_auto_at_startup=1
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_cs_checkers = ['syntax', 'semantic', 'issues']
let g:tsuquyomi_disable_quickfix = 1
" let g:syntastic_typescript_checkers = ['tsuquyomi']
let g:syntastic_ocaml_checkers = ['merlin']
let g:syntastic_reason_checkers = ['merlin']
" let g:syntastic_javascript_checkers = ['flow', 'eslint']
autocmd FileType javascript set formatprg=prettier\ --stdin\ --trailing-comma=es5\ --print-width=80\ --parser=flow
autocmd BufWritePre *.js exe "normal! gggqG\<C-o>\<C-o>"
autocmd BufWritePre *.jsx exe "normal! gggqG\<C-o>\<C-o>"
autocmd FileType typescript set formatprg=prettier\ --stdin\ --trailing-comma=es5\ --print-width=80\ --parser=typescript
autocmd BufWritePre *.ts exe "normal! gggqG\<C-o>\<C-o>"
autocmd BufWritePre *.tsx exe "normal! gggqG\<C-o>\<C-o>"
autocmd FileType graphql set formatprg=prettier\ --stdin\ --trailing-comma=es5\ --print-width=80\ --parser=graphql
autocmd BufWritePre *.graphql exe "normal! gggqG\<C-o>\<C-o>"
autocmd BufNewFile,BufRead *.ts set filetype=typescript
autocmd BufNewFile,BufRead *.tsx set filetype=typescript
autocmd BufNewFile,BufRead *.re set filetype=reason
" autocmd FileType text,markdown,mail setlocal spell
let g:guesslang_langs = [ 'en_US', 'de_DE', 'es', 'it' ]
let g:ale_sign_column_always = 1
let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok']
set noswapfile
set noerrorbells
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
let NERDChristmasTree = 1
" let g:airline_left_sep=' '
" let g:airline_right_sep=' '
let g:airline_powerline_fonts=0
let g:airline_symbols_ascii = 1
let g:vimreason_extra_args_expr_reason = '"--print-width " . ' . "min([80, winwidth('.')])"
" Automatically start language servers.
let g:LanguageClient_autoStart = 1
let g:LanguageClient_serverCommands = {
\ 'reason': ['ocaml-language-server', '--stdio'],
\ 'ocaml': ['ocaml-language-server', '--stdio'],
\ }
nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
noremap <silent> gf :call LanguageClient_textDocument_formatting()<CR>
nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
if executable('refmt')
let g:neoformat_reason_refmt = {
\ 'exe': 'refmt',
\ 'stdin': 1,
\ }
let g:neoformat_enabled_reason = ['refmt']
augroup refmt
autocmd!
autocmd BufWritePre *.re Neoformat
augroup END
endif
set clipboard+=unnamedplus
let g:deoplete#enable_at_startup = 1
let g:nvim_typescript#type_info_on_hold = 1
let g:spotify_token='NGE4ZDU0NTJiYmUzNGI2OGE0Y2M5NDU1MTk4ZjFjMWI6ZTRmMzAxZWFjOTYxNDU1YWE3NDYxZjMwMmY2ODgyOWM='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment