Created
August 9, 2020 15:30
-
-
Save jfrolich/e2a9ee95e378a40135ab2477710ee39a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
call plug#begin("~/.vim/plugged") | |
Plug 'prettier/vim-prettier' | |
Plug 'elixir-editors/vim-elixir' | |
Plug 'slashmili/alchemist.vim' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'mhartington/oceanic-next' | |
Plug 'jparise/vim-graphql' | |
Plug 'rgrinberg/vim-ocaml', {'for': ['ocaml', 'opam', 'dune'] } | |
Plug 'jfrolich/vim-reasonml' | |
Plug 'lifepillar/vim-mucomplete' | |
Plug 'sbdchd/neoformat' | |
Plug 'scrooloose/syntastic' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'peitalin/vim-jsx-typescript' | |
Plug 'mhartington/oceanic-next' | |
Plug 'jfrolich/vim-graphql' | |
call plug#end() | |
" Configure plugins | |
set completeopt+=menuone | |
set completeopt+=noselect | |
set shortmess+=c " Shut off completion messages | |
set belloff+=ctrlg " If Vim beeps during completion | |
let g:mucomplete#can_complete = {} | |
let g:mucomplete#enable_auto_at_startup = 1 | |
let g:mucomplete#completion_delay = 1 | |
let g:mucomplete#chains = {'default': ['omni']} | |
let g:node_host_prog = '/usr/local/bin/neovim-node-host' | |
let g:syntastic_reason = 1 | |
let g:syntastic_ocaml_checkers = ['merlin'] | |
let g:syntastic_reason_checkers = ['merlin'] | |
" autoformat | |
autocmd BufWritePre *.tsx Neoformat | |
autocmd BufWritePre *.md Neoformat | |
autocmd BufWritePre *.mdx Neoformat | |
autocmd BufWritePre *.ex Neoformat | |
autocmd BufWritePre *.exs Neoformat | |
autocmd BufWritePre *.re Neoformat | |
autocmd BufWritePre *.rei Neoformat | |
" necessary for now when you want to use Bucklescript... | |
" let g:reasonml_force_ocamlmerlin_path = '/Users/Jaap/.opam/4.06.1/bin/ocamlmerlin' | |
" let $FZF_DEFAULT_COMMAND = 'fd -E .git -E ''*.bs.js'' -E ''*.gen.tsx'' --hidden --type f' | |
let $FZF_DEFAULT_COMMAND = 'fd -E .git --hidden --type f' | |
nnoremap <C-p> :Files<Cr> | |
nnoremap <C-b> :Buffers<Cr> | |
" Turn on syntax highlighting | |
syntax on | |
" For plugins to load correctly | |
filetype plugin indent on | |
let mapleader = "," | |
let maplocalleader = "," | |
" Security | |
set modelines=0 | |
" Show line numbers | |
set number | |
" Show file stats | |
set ruler | |
" Blink cursor on error instead of beeping (grr) | |
set visualbell | |
" Encoding | |
set encoding=utf-8 | |
" Whitespace | |
set formatoptions=tcqrn1 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set noshiftround | |
syntax enable | |
highlight LineNr ctermfg=244 | |
set clipboard=unnamed | |
" Move text around, pretty cool, but I rather use the shortcuts for moving | |
" around windows | |
" | |
" nnoremap <C-j> :m .+1<CR>== | |
" nnoremap <C-k> :m .-2<CR>== | |
" inoremap <C-j> <Esc>:m .+1<CR>==gi | |
" inoremap <C-k> <Esc>:m .-2<CR>==gi | |
" vnoremap <C-j> :m '>+1<CR>gv=gv | |
" vnoremap <C-k> :m '<-2<CR>gv=gv | |
" | |
nnoremap <C-h> <C-w><C-h> | |
nnoremap <C-l> <C-w><C-l> | |
nnoremap <C-j> <C-w><C-j> | |
nnoremap <C-k> <C-w><C-k> | |
inoremap <C-h> <C-w><C-h> | |
inoremap <C-l> <C-w><C-l> | |
inoremap <C-j> <C-w><C-j> | |
inoremap <C-k> <C-w><C-k> | |
vnoremap <C-h> <C-w><C-h> | |
vnoremap <C-l> <C-w><C-l> | |
vnoremap <C-j> <C-w><C-j> | |
vnoremap <C-k> <C-w><C-k> | |
" faster performance | |
set ttyfast | |
set lazyredraw | |
let g:matchparen_timeout = 2 | |
let g:matchparen_insert_timeout = 2 | |
set colorcolumn=80 | |
set textwidth=80 | |
highlight ColorColumn ctermbg=244 guibg=darkgrey | |
set nowrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment