Created
August 15, 2018 17:02
-
-
Save carylee/18afa9d93adbf57b63aed4af75b2abf7 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
filetype plugin indent on | |
set nocompatible | |
syntax on | |
filetype off | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set termguicolors | |
function! BuildComposer(info) | |
if a:info.status != 'unchanged' || a:info.force | |
if has('nvim') | |
!cargo build --release | |
else | |
!cargo build --release --no-default-features --features json-rpc | |
endif | |
endif | |
endfunction | |
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') } | |
" Colors | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
Plug 'morhetz/gruvbox' | |
" Frontend | |
Plug 'rstacruz/sparkup' | |
Plug 'mustache/vim-mustache-handlebars' | |
Plug 'pangloss/vim-javascript' | |
Plug 'dsawardekar/ember.vim' | |
Plug 'maksimr/vim-jsbeautify' | |
" Browsing and navigation | |
Plug 'scrooloose/nerdtree' | |
"Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'bling/vim-airline' | |
Plug 'powerman/vim-plugin-AnsiEsc' | |
Plug 'christoomey/vim-tmux-navigator' | |
Plug '/usr/local/opt/fzf' | |
Plug 'junegunn/fzf.vim' | |
" Language support | |
Plug 'fatih/vim-go' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'elzr/vim-json' | |
Plug 'vim-scripts/SQLUtilities' | |
Plug 'ekalinin/Dockerfile.vim' | |
" Python | |
Plug 'davidhalter/jedi-vim' | |
Plug 'zchee/deoplete-jedi' | |
let g:jedi#completions_enabled = 0 | |
" Parens | |
"Plug 'bhurlow/vim-parinfer' | |
Plug 'eraserhd/parinfer-rust' | |
" Git support | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-rhubarb' | |
" Async linting | |
Plug 'w0rp/ale' | |
" Autocompletion | |
if has('nvim') | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'Shougo/neco-syntax' | |
else | |
Plug 'Shougo/deoplete.nvim' | |
Plug 'roxma/nvim-yarp' | |
Plug 'roxma/vim-hug-neovim-rpc' | |
endif | |
let g:deoplete#enable_at_startup = 1 | |
" Clojure-related plugins | |
Plug 'tpope/vim-dispatch' | |
Plug 'tpope/vim-classpath' | |
Plug 'tpope/vim-salve' | |
Plug 'tpope/vim-fireplace' | |
" Plug 'vim-scripts/paredit.vim' | |
" Plug 'guns/vim-sexp' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-repeat' | |
Plug 'oplatek/Conque-Shell' | |
Plug 'junegunn/rainbow_parentheses.vim' | |
Plug 'guns/vim-clojure-highlight' | |
Plug 'dgrnbrg/vim-redl' | |
Plug 'clojure-vim/async-clj-omni' | |
"Plug 'venantius/vim-cljfmt' | |
" Whitespace | |
Plug 'ntpeters/vim-better-whitespace' | |
" Initialze plugin system | |
call plug#end() | |
set background=dark | |
" let g:solarized_termcolors=256 | |
" let g:solarized_termtrans = 1 | |
" colorscheme solarized | |
" color dracula | |
colorscheme gruvbox | |
" Allow mouse scrolling in terminal | |
set mouse=nicr | |
set backupdir=~/.vimswaps,/tmp | |
" Store swap files in a fixed location | |
"set dir=~/.vimswap//,/var/tmp//,/tmp//,. | |
" Toogle NERDTree with Ctrl+n | |
map <C-n> :NERDTreeToggle<CR> | |
" Experimental clojure additions | |
"Rainbow Parens | |
let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']] | |
" Activation based on file type | |
augroup rainbow_lisp | |
autocmd! | |
autocmd FileType lisp,clojure,scheme RainbowParentheses | |
augroup END | |
"let g:clj_fmt_autosave = 0 | |
" Change to the directory the file in your current buffer is in | |
au BufEnter * if &buftype != "nofile" && isdirectory(expand("%:p:h")) | |
\ | lcd %:p:h | endif | |
" in-editor repl | |
nnoremap <C-w>r :ConqueTermVSplit lein repl<CR> | |
nnoremap <C-w>R :ConqueTermSplit lein repl<CR> | |
nnoremap <C-w>f :ConqueTermVSplit lein figwheel dev<CR> | |
nnoremap <C-w>F :ConqueTermSplit lein figwheel dev<CR> | |
let g:ConqueTerm_StartMessages = 0 | |
let g:ConqueTerm_CloseOnEnd = 1 | |
" syntax highlighting | |
augroup filetypedetect | |
au! BufNewFile,BufRead *.clj setf clojure | |
augroup END | |
" Easier split navigation | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" More natural split opening | |
set splitbelow | |
set splitright | |
" Enable async-clj-omni | |
let g:deoplete#keyword_patterns = {} | |
let g:deoplete#keyword_patterns.clojure = '[\w!$%&*+/:<=>?@\^_~\-\.#]*' | |
set clipboard=unnamed | |
"let g:ctrlp_max_files=0 | |
"let g:ctrlp_max_depth=40 | |
"" The Silver Searcher | |
if executable('ag') | |
" Use ag over grep | |
set grepprg=ag\ --nogroup\ --nocolor | |
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore | |
"let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
" ag is fast enough that CtrlP doesn't need to cache | |
"let g:ctrlp_use_caching = 0 | |
endif | |
set rtp+=/usr/local/opt/fzf | |
let g:markdown_composer_open_browser = 0 | |
nnoremap <C-P> :GFiles <CR> | |
" Get python working | |
" Instructions from https://github.com/tweekmonster/nvim-python-doctor/wiki/Advanced:-Using-pyenv | |
let g:python_host_prog = '/Users/cary/.pyenv/versions/neovim2/bin/python' | |
let g:python3_host_prog = '/Users/cary/.pyenv/versions/neovim3/bin/python' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment