2018-07-12 13:04:00 +02:00
|
|
|
syntax on
|
|
|
|
filetype indent on
|
|
|
|
|
|
|
|
set encoding=utf-8
|
|
|
|
set clipboard=unnamed
|
2018-08-30 10:54:35 +02:00
|
|
|
set clipboard+=unnamedplus
|
2018-07-12 13:04:00 +02:00
|
|
|
set smartindent
|
|
|
|
set shiftwidth=2
|
|
|
|
set tabstop=2
|
|
|
|
set expandtab
|
|
|
|
set number
|
|
|
|
set autoread
|
2018-09-21 08:51:56 +02:00
|
|
|
set hidden
|
2018-07-12 13:04:00 +02:00
|
|
|
set background=dark
|
2018-07-12 13:15:21 +02:00
|
|
|
set rtp^=/usr/share/vim/vimfiles/
|
2019-03-29 10:32:11 +01:00
|
|
|
set undodir=~/.local/share/nvim/undodir
|
|
|
|
set undofile
|
2019-08-02 11:47:53 +02:00
|
|
|
set colorcolumn=80
|
|
|
|
set foldmethod=syntax
|
|
|
|
set foldlevelstart=20
|
2018-07-12 13:04:00 +02:00
|
|
|
|
2018-10-13 11:11:46 +02:00
|
|
|
"Plugins
|
|
|
|
call plug#begin('~/.local/share/nvim/plugged')
|
2019-08-02 11:47:53 +02:00
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" Pretty Status Lines
|
2018-10-13 11:11:46 +02:00
|
|
|
Plug 'vim-airline/vim-airline'
|
2018-11-06 09:06:29 +01:00
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
|
|
|
" Buffers
|
|
|
|
Plug 'jlanzarotta/bufexplorer'
|
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" Completion
|
2019-01-23 12:04:05 +01:00
|
|
|
Plug 'honza/vim-snippets'
|
2019-08-02 11:47:53 +02:00
|
|
|
Plug 'epilande/vim-react-snippets'
|
|
|
|
Plug 'neoclide/coc.nvim', {'do': './install.sh'}
|
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" Colorscheme
|
|
|
|
Plug 'arcticicestudio/nord-vim'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" Pretty parenthesis
|
|
|
|
Plug 'luochen1990/rainbow'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" File handling
|
2019-08-02 11:47:53 +02:00
|
|
|
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
|
2019-04-03 11:51:53 +02:00
|
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" Python
|
|
|
|
Plug 'numirias/semshi'
|
|
|
|
Plug 'w0rp/ale'
|
|
|
|
Plug 'ambv/black'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" HTML
|
2019-01-23 12:04:05 +01:00
|
|
|
Plug 'jonsmithers/vim-html-template-literals'
|
2019-04-12 10:32:48 +02:00
|
|
|
Plug 'mxw/vim-jsx'
|
2019-01-23 12:04:05 +01:00
|
|
|
Plug 'pangloss/vim-javascript'
|
2019-02-15 14:23:02 +01:00
|
|
|
Plug 'alvan/vim-closetag'
|
2019-08-02 11:47:53 +02:00
|
|
|
|
|
|
|
" Testing
|
|
|
|
Plug 'janko/vim-test'
|
2018-10-13 11:11:46 +02:00
|
|
|
call plug#end()
|
|
|
|
|
2019-01-08 13:57:59 +01:00
|
|
|
colorscheme nord
|
|
|
|
|
2018-07-12 13:04:00 +02:00
|
|
|
"Airline
|
2019-08-02 11:47:53 +02:00
|
|
|
if !exists('g:airline_symbols')
|
|
|
|
let g:airline_symbols = {}
|
|
|
|
endif
|
|
|
|
let g:airline#extensions#tabline#enabled = 0
|
2019-01-08 13:57:59 +01:00
|
|
|
let g:airline_theme='nord'
|
2019-08-02 11:47:53 +02:00
|
|
|
let g:airline_symbols.maxlinenr = ''
|
|
|
|
|
|
|
|
" BufExplorer
|
|
|
|
nnoremap <silent> <F36> :BufExplorerVerticalSplit<CR>
|
|
|
|
nnoremap <silent> <F12> :bn<CR>
|
|
|
|
nnoremap <silent> <F24> :bp<CR>
|
|
|
|
|
|
|
|
" CoC
|
|
|
|
nmap <silent> gd <Plug>(coc-definition)
|
|
|
|
nmap <silent> gy <Plug>(coc-type-definition)
|
|
|
|
nmap <silent> gi <Plug>(coc-implementation)
|
|
|
|
nmap <silent> gr <Plug>(coc-references)
|
|
|
|
inoremap <silent><expr> <c-space> coc#refresh()
|
2018-07-12 13:04:00 +02:00
|
|
|
|
2019-08-02 11:47:53 +02:00
|
|
|
" Testing
|
|
|
|
nmap <silent> <F34> :TestNearest<CR>
|
|
|
|
nmap <silent> t<C-n> :TestNearest<CR>
|
|
|
|
nmap <silent> <F22> :TestFile<CR>
|
|
|
|
nmap <silent> t<C-f> :TestFile<CR>
|
|
|
|
nmap <silent> t<C-s> :TestSuite<CR>
|
|
|
|
nmap <silent> t<C-l> :TestLast<CR>
|
|
|
|
nmap <silent> t<C-g> :TestVisit<CR>
|
2019-03-29 10:32:11 +01:00
|
|
|
|
|
|
|
" Syntastic
|
2018-11-06 09:06:29 +01:00
|
|
|
let g:syntastic_python_checkers = ['python']
|
|
|
|
|
2019-01-08 13:57:59 +01:00
|
|
|
"Rainbow Parentheses
|
|
|
|
let g:rainbow_active = 1
|
|
|
|
|
2019-01-23 12:04:05 +01:00
|
|
|
" HTML
|
2019-02-15 14:23:02 +01:00
|
|
|
let g:closetag_filenames = '*.html,*.js'
|
2019-01-23 12:04:05 +01:00
|
|
|
let g:html_indent_style1 = "inc"
|
|
|
|
|
2019-02-15 14:23:02 +01:00
|
|
|
" Black
|
|
|
|
autocmd BufWritePre *.py execute ':Black'
|
|
|
|
|
2019-08-02 11:47:53 +02:00
|
|
|
" Defx
|
|
|
|
map <silent><M-1> :Defx -toggle -split=vertical -winwidth=40 <CR>
|
|
|
|
autocmd FileType defx call s:defx_my_settings()
|
|
|
|
function! s:defx_my_settings() abort
|
|
|
|
nnoremap <silent><buffer><expr> <CR>
|
|
|
|
\ defx#is_directory() ? defx#do_action('open') :
|
|
|
|
\ defx#do_action('multi', ['drop', 'quit'])
|
|
|
|
nnoremap <silent><buffer><expr> <BS>
|
|
|
|
\ defx#do_action('cd', '..')
|
|
|
|
nnoremap <silent><buffer><expr> <c-i>
|
|
|
|
\ defx#do_action('toggle_ignored_files')
|
|
|
|
endfunction
|
|
|
|
|
2019-04-03 11:51:53 +02:00
|
|
|
" FZF
|
2019-08-02 11:47:53 +02:00
|
|
|
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'
|
2019-04-03 11:51:53 +02:00
|
|
|
command! -bang -nargs=? -complete=dir HFiles
|
2019-08-02 11:47:53 +02:00
|
|
|
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'}, <bang>0)
|
|
|
|
map <M-2> :Files<CR>
|
|
|
|
map <M-3> :HFiles<CR>
|
2019-04-03 11:51:53 +02:00
|
|
|
|
2018-07-12 13:04:00 +02:00
|
|
|
"Mappings
|
2019-08-02 11:47:53 +02:00
|
|
|
:vmap r "_dP
|
2018-07-12 13:04:00 +02:00
|
|
|
:nmap <c-s> :w<CR>
|
|
|
|
:imap <c-s> <Esc>:w<CR>a
|
2019-04-03 11:51:53 +02:00
|
|
|
:nmap <F28> :bd<CR>
|
2018-11-06 09:06:29 +01:00
|
|
|
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>
|
2019-08-02 11:47:53 +02:00
|
|
|
nnoremap <F9> :%!jq '.'<CR>
|
2019-02-15 14:23:02 +01:00
|
|
|
|
2018-07-12 13:04:00 +02:00
|
|
|
"AutoCommands
|
|
|
|
au BufWinEnter * set number
|
|
|
|
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
|
2018-10-17 21:06:18 +02:00
|
|
|
autocmd FileType python setlocal completeopt-=preview
|