-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
88 lines (74 loc) · 2.17 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
filetype off
execute pathogen#infect()
filetype plugin indent on
set nocompatible " be iMproved, required
syntax on
set t_Co=256
set guifont=Hack\ 12
set autoindent
set expandtab
set laststatus=2
set noswapfile
set nobackup
set nowb
set number rnu
set splitbelow
set splitright
set tabstop=2 shiftwidth=2 softtabstop=2
set mouse=a
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
set background=dark
set hidden
set runtimepath+=~/.vim/bundle/LanguageClient-neovim
let mapleader = "_"
inoremap jj <esc>
nmap <Leader><Space> :noh<CR>
nmap <Leader>: :FZF<CR>
nmap <Leader>f :ALEFix<CR>
" These mappings make it easier to move between splits
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>
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
autocmd Filetype gitcommit setlocal spell textwidth=72
colo seoul256
let g:airline_powerline_fonts = 1
let g:airline_theme = 'deus'
let g:airline_section_c = '%t'
let g:airline_section_x = ''
let g:airline_section_y = ''
let g:ale_fixers = {
\ 'typescript': ['tslint'],
\}
let g:airline#extensions#ale#enabled = 1
let g:jsx_ext_required = 0
let g:deoplete#enable_at_startup = 1
let g:LanguageClient_settingsPath='~/.neovim-languageclient-settings.json'
let g:LanguageClient_serverCommands = {
\ 'elixir': ['~/Developer/elixir-ls/rel/language_server.sh'],
\ 'python': ['~/.asdf/shims/pyls'],
\ 'ruby': ['~/.asdf/shims/solargraph', 'stdio'],
\ }
let g:terraform_fmt_on_save=1
" Mappings for the language client
nnoremap <Leader>5 :call LanguageClient_contextMenu()<CR>
nnoremap <silent>K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent>gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <Leader>2 :call LanguageClient#textDocument_rename()<CR>
" Mappings for vim test
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
nmap <silent> <leader>g :TestVisit<CR>
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite * :call DeleteTrailingWS()