about summary refs log blame commit diff stats
path: root/config/nvim/init.vim
blob: 64e6dfeafb59904fe01be586d4a681e2ddb0e5a4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                                                             







                             

                              







                            

                            



                               
            











































                                                                                

                                    




                                          

           


                          


            

                                                    
                                           
                        




                                                                                

                     
" 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