about summary refs log tree commit diff stats
path: root/config/nvim/init.vim
blob: 64e6dfeafb59904fe01be586d4a681e2ddb0e5a4 (plain) (blame)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
" PLUGINS
" we plug now, babey
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
	echo "Downloading junegunn/vim-plug to manage plugins..."
	silent !mkdir -p ~/.config/nvim/autoload/
	silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
endif
call plug#begin('~/.local/share/nvim/plugged')
" MatchTag
Plug 'gregsexton/matchtag'
" lightline.vim
Plug 'itchyny/lightline.vim'
" vim-fugitive
Plug 'tpope/vim-fugitive'
" vim-gitgutter
Plug 'airblade/vim-gitgutter'
" vim-surround
Plug 'tpope/vim-surround'
" JsBeautify
Plug 'maksimr/vim-jsbeautify'
" syntax checking
Plug 'vim-syntastic/syntastic'
" lf integration
Plug 'ptzz/lf.vim'
" req for lf.vim
Plug 'rbgrouleff/bclose.vim'
"""plugin graveyard
" END PLUGINS
"" recognize color tags
"Plug 'lilydjwg/colorizer'
"" VimCompletesMe
"Plug 'ajh17/VimCompletesMe'
call plug#end()

" end of vim-plug related lines

colo zellner

" productivity binds

" unbind arrow keys like some kind of neurotic chucklefuck
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>

"" JsBeautify binds
autocmd FileType javascript noremap <buffer>  <c-f> :call JsBeautify()<cr>
" for json
autocmd FileType json noremap <buffer> <c-f> :call JsonBeautify()<cr>
" for jsx
autocmd FileType jsx noremap <buffer> <c-f> :call JsxBeautify()<cr>
" for html
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr>
" for css or scss
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr>
"" and for visual mode:
autocmd FileType javascript vnoremap <buffer>  <c-f> :call RangeJsBeautify()<cr>
" for json
autocmd FileType json vnoremap <buffer> <c-f> :call RangeJsonBeautify()<cr>
" for jsx
autocmd FileType jsx vnoremap <buffer> <c-f> :call RangeJsxBeautify()<cr>
" for html
autocmd FileType html vnoremap <buffer> <c-f> :call RangeHtmlBeautify()<cr>
" for css or scss
autocmd FileType css vnoremap <buffer> <c-f> :call RangeCSSBeautify()<cr>

" syntastic config
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

let g:syntastic_aggregate_errors = 1
let g:syntastic_c_compiler = "cc"

" lightline config
set noshowmode
let g:lightline = {
	\ 'colorscheme': 'selenized_dark',
	\ }

" lf config
let g:lf_replace_netrw = 1

" betterize
set path+=**

cno w!! exe 'sil! w !doas tee % >/dev/null' <bar> e!
nno <space> :noh<return><space>
" add a ctags shortcut like a shitty goblin
com! MakeTags !ctags ./*
" calcurse notes should be treated as markdown
autocmd BufRead,BufNewFile /tmp/calcurse* set filetype=markdown
autocmd BufRead,BufNewFile ~/.local/share/calcurse/notes/* set filetype=markdown
" ksh should work
autocmd FileType ksh let g:is_kornshell = 1
" good folds
set foldmethod=marker